| OLD | NEW |
| 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 Loading... |
| 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 Loading... |
| 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 |
| OLD | NEW |