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

Side by Side Diff: chrome/browser/sync/sessions/sync_session_unittest.cc

Issue 8638001: [Sync] Made some sync session member functions const (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix latent bug in StatusController Created 9 years, 1 month 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "chrome/browser/sync/sessions/sync_session.h" 5 #include "chrome/browser/sync/sessions/sync_session.h"
6 6
7 #include "base/compiler_specific.h" 7 #include "base/compiler_specific.h"
8 #include "base/location.h" 8 #include "base/location.h"
9 #include "base/memory/ref_counted.h" 9 #include "base/memory/ref_counted.h"
10 #include "base/message_loop.h" 10 #include "base/message_loop.h"
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after
75 const sessions::SyncSessionSnapshot& snapshot) { 75 const sessions::SyncSessionSnapshot& snapshot) {
76 FailControllerInvocationIfDisabled("SyncProtocolError"); 76 FailControllerInvocationIfDisabled("SyncProtocolError");
77 } 77 }
78 78
79 // ModelSafeWorkerRegistrar implementation. 79 // ModelSafeWorkerRegistrar implementation.
80 virtual void GetWorkers(std::vector<ModelSafeWorker*>* out) OVERRIDE {} 80 virtual void GetWorkers(std::vector<ModelSafeWorker*>* out) OVERRIDE {}
81 virtual void GetModelSafeRoutingInfo(ModelSafeRoutingInfo* out) OVERRIDE { 81 virtual void GetModelSafeRoutingInfo(ModelSafeRoutingInfo* out) OVERRIDE {
82 out->swap(routes_); 82 out->swap(routes_);
83 } 83 }
84 84
85 StatusController* status() { return session_->status_controller(); } 85 StatusController* status() { return session_->mutable_status_controller(); }
86 protected: 86 protected:
87 void FailControllerInvocationIfDisabled(const std::string& msg) { 87 void FailControllerInvocationIfDisabled(const std::string& msg) {
88 if (!controller_invocations_allowed_) 88 if (!controller_invocations_allowed_)
89 FAIL() << msg; 89 FAIL() << msg;
90 } 90 }
91 91
92 syncable::ModelTypeBitSet ParamsMeaningAllEnabledTypes() { 92 syncable::ModelTypeBitSet ParamsMeaningAllEnabledTypes() {
93 syncable::ModelTypeBitSet request_params; 93 syncable::ModelTypeBitSet request_params;
94 request_params[syncable::BOOKMARKS] = true; 94 request_params[syncable::BOOKMARKS] = true;
95 request_params[syncable::AUTOFILL] = true; 95 request_params[syncable::AUTOFILL] = true;
(...skipping 382 matching lines...) Expand 10 before | Expand all | Expand 10 after
478 EXPECT_EQ(empty_payload, original[syncable::BOOKMARKS]); 478 EXPECT_EQ(empty_payload, original[syncable::BOOKMARKS]);
479 EXPECT_EQ(payload1, original[syncable::PASSWORDS]); 479 EXPECT_EQ(payload1, original[syncable::PASSWORDS]);
480 EXPECT_EQ(payload1, original[syncable::AUTOFILL]); 480 EXPECT_EQ(payload1, original[syncable::AUTOFILL]);
481 EXPECT_EQ(payload2, original[syncable::SESSIONS]); 481 EXPECT_EQ(payload2, original[syncable::SESSIONS]);
482 EXPECT_EQ(payload3, original[syncable::THEMES]); 482 EXPECT_EQ(payload3, original[syncable::THEMES]);
483 } 483 }
484 484
485 } // namespace 485 } // namespace
486 } // namespace sessions 486 } // namespace sessions
487 } // namespace browser_sync 487 } // namespace browser_sync
OLDNEW
« no previous file with comments | « chrome/browser/sync/sessions/sync_session_context.h ('k') | chrome/browser/sync/sessions/test_util.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698