| 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/memory/ref_counted.h" | 8 #include "base/memory/ref_counted.h" |
| 9 #include "base/tracked.h" | 9 #include "base/tracked.h" |
| 10 #include "chrome/browser/sync/engine/conflict_resolver.h" | 10 #include "chrome/browser/sync/engine/conflict_resolver.h" |
| (...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 64 const base::TimeDelta& new_interval) OVERRIDE { | 64 const base::TimeDelta& new_interval) OVERRIDE { |
| 65 FailControllerInvocationIfDisabled("OnReceivedShortPollIntervalUpdate"); | 65 FailControllerInvocationIfDisabled("OnReceivedShortPollIntervalUpdate"); |
| 66 } | 66 } |
| 67 virtual void OnReceivedSessionsCommitDelay( | 67 virtual void OnReceivedSessionsCommitDelay( |
| 68 const base::TimeDelta& new_delay) OVERRIDE { | 68 const base::TimeDelta& new_delay) OVERRIDE { |
| 69 FailControllerInvocationIfDisabled("OnReceivedSessionsCommitDelay"); | 69 FailControllerInvocationIfDisabled("OnReceivedSessionsCommitDelay"); |
| 70 } | 70 } |
| 71 virtual void OnShouldStopSyncingPermanently() OVERRIDE { | 71 virtual void OnShouldStopSyncingPermanently() OVERRIDE { |
| 72 FailControllerInvocationIfDisabled("OnShouldStopSyncingPermanently"); | 72 FailControllerInvocationIfDisabled("OnShouldStopSyncingPermanently"); |
| 73 } | 73 } |
| 74 virtual void OnSyncProtocolError( |
| 75 const sessions::SyncSessionSnapshot& snapshot) { |
| 76 FailControllerInvocationIfDisabled("SyncProtocolError"); |
| 77 } |
| 74 | 78 |
| 75 // ModelSafeWorkerRegistrar implementation. | 79 // ModelSafeWorkerRegistrar implementation. |
| 76 virtual void GetWorkers(std::vector<ModelSafeWorker*>* out) OVERRIDE {} | 80 virtual void GetWorkers(std::vector<ModelSafeWorker*>* out) OVERRIDE {} |
| 77 virtual void GetModelSafeRoutingInfo(ModelSafeRoutingInfo* out) OVERRIDE { | 81 virtual void GetModelSafeRoutingInfo(ModelSafeRoutingInfo* out) OVERRIDE { |
| 78 out->swap(routes_); | 82 out->swap(routes_); |
| 79 } | 83 } |
| 80 | 84 |
| 81 StatusController* status() { return session_->status_controller(); } | 85 StatusController* status() { return session_->status_controller(); } |
| 82 protected: | 86 protected: |
| 83 void FailControllerInvocationIfDisabled(const std::string& msg) { | 87 void FailControllerInvocationIfDisabled(const std::string& msg) { |
| (...skipping 389 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 473 EXPECT_EQ(empty_payload, original[syncable::BOOKMARKS]); | 477 EXPECT_EQ(empty_payload, original[syncable::BOOKMARKS]); |
| 474 EXPECT_EQ(payload1, original[syncable::PASSWORDS]); | 478 EXPECT_EQ(payload1, original[syncable::PASSWORDS]); |
| 475 EXPECT_EQ(payload1, original[syncable::AUTOFILL]); | 479 EXPECT_EQ(payload1, original[syncable::AUTOFILL]); |
| 476 EXPECT_EQ(payload2, original[syncable::SESSIONS]); | 480 EXPECT_EQ(payload2, original[syncable::SESSIONS]); |
| 477 EXPECT_EQ(payload3, original[syncable::THEMES]); | 481 EXPECT_EQ(payload3, original[syncable::THEMES]); |
| 478 } | 482 } |
| 479 | 483 |
| 480 } // namespace | 484 } // namespace |
| 481 } // namespace sessions | 485 } // namespace sessions |
| 482 } // namespace browser_sync | 486 } // namespace browser_sync |
| OLD | NEW |