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

Unified Diff: remoting/protocol/fake_session.cc

Issue 7796026: Pass SessionConfig by reference instead of pointer. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 years, 3 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/fake_session.cc
diff --git a/remoting/protocol/fake_session.cc b/remoting/protocol/fake_session.cc
index 822cfea499288b9082df65e664300dda6a76018b..2445d0cc57a6e22c5192f7668e1601ddc4d3d1b1 100644
--- a/remoting/protocol/fake_session.cc
+++ b/remoting/protocol/fake_session.cc
@@ -203,7 +203,7 @@ bool FakeUdpSocket::SetSendBufferSize(int32 size) {
FakeSession::FakeSession()
: candidate_config_(CandidateSessionConfig::CreateDefault()),
- config_(SessionConfig::CreateDefault()),
+ config_(SessionConfig::GetDefault()),
message_loop_(NULL),
jid_(kTestJid) {
}
@@ -252,13 +252,12 @@ const CandidateSessionConfig* FakeSession::candidate_config() {
return candidate_config_.get();
}
-const SessionConfig* FakeSession::config() {
- CHECK(config_.get());
- return config_.get();
+const SessionConfig& FakeSession::config() {
+ return config_;
}
-void FakeSession::set_config(const SessionConfig* config) {
- config_.reset(config);
+void FakeSession::set_config(const SessionConfig& config) {
+ config_ = config;
}
const std::string& FakeSession::initiator_token() {

Powered by Google App Engine
This is Rietveld 408576698