blob: f6785a9d94ddaa04a6820b9c128b69a891dce1e9 [file] [log] [blame]
zijiehe8db16ca2017-02-07 23:49:321// Copyright 2017 The Chromium Authors. All rights reserved.
2// Use of this source code is governed by a BSD-style license that can be
3// found in the LICENSE file.
4
5#include "remoting/client/host_experiment_sender.h"
6
7#include "remoting/base/constants.h"
8
9namespace remoting {
10
11HostExperimentSender::HostExperimentSender(const std::string& experiment_config)
12 : experiment_config_(experiment_config) {}
13
Mirko Bonadei80d1cea2019-01-18 22:22:1714std::unique_ptr<jingle_xmpp::XmlElement> HostExperimentSender::GetNextMessage() {
zijiehe8db16ca2017-02-07 23:49:3215 if (message_sent_ || experiment_config_.empty()) {
16 return nullptr;
17 }
18 message_sent_ = true;
Mirko Bonadei80d1cea2019-01-18 22:22:1719 std::unique_ptr<jingle_xmpp::XmlElement> configuration(new jingle_xmpp::XmlElement(
20 jingle_xmpp::QName(kChromotingXmlNamespace, "host-configuration")));
zijiehe8db16ca2017-02-07 23:49:3221 configuration->SetBodyText(experiment_config_);
22 return configuration;
23}
24
25void HostExperimentSender::OnIncomingMessage(
Mirko Bonadei80d1cea2019-01-18 22:22:1726 const jingle_xmpp::XmlElement& attachments) {}
zijiehe8db16ca2017-02-07 23:49:3227
28} // namespace remoting