Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(566)

Unified Diff: remoting/protocol/protocol_mock_objects.cc

Issue 2615113005: [Chromoting] Use HostExperimentSessionPlugin in host (Closed)
Patch Set: Created 3 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: remoting/protocol/protocol_mock_objects.cc
diff --git a/remoting/protocol/protocol_mock_objects.cc b/remoting/protocol/protocol_mock_objects.cc
index 70581e4b134a74824f7d5838113d0194964f09d7..39f2137605839a20c482aa467041e16289d7495b 100644
--- a/remoting/protocol/protocol_mock_objects.cc
+++ b/remoting/protocol/protocol_mock_objects.cc
@@ -51,6 +51,23 @@ MockSession::MockSession() {}
MockSession::~MockSession() {}
+void MockSession::AddPlugin(SessionPlugin* plugin) {
+ DCHECK(plugin);
+ for (const auto& message : attachments_) {
+ if (message.attachments) {
+ plugin->OnIncomingMessage(*(message.attachments));
+ }
+ }
+}
+
+void MockSession::SetAttachment(size_t round,
+ std::unique_ptr<buzz::XmlElement> attachment) {
+ while (attachments_.size() <= round) {
+ attachments_.emplace_back();
+ }
+ attachments_[round].AddAttachment(std::move(attachment));
+}
+
MockSessionManager::MockSessionManager() {}
MockSessionManager::~MockSessionManager() {}
« remoting/protocol/protocol_mock_objects.h ('K') | « remoting/protocol/protocol_mock_objects.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698