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 OnSyncError(sessions::SyncSession* session) { |
| 75 FailControllerInvocationIfDisabled("OnSyncError"); |
| 76 } |
74 | 77 |
75 // ModelSafeWorkerRegistrar implementation. | 78 // ModelSafeWorkerRegistrar implementation. |
76 virtual void GetWorkers(std::vector<ModelSafeWorker*>* out) OVERRIDE {} | 79 virtual void GetWorkers(std::vector<ModelSafeWorker*>* out) OVERRIDE {} |
77 virtual void GetModelSafeRoutingInfo(ModelSafeRoutingInfo* out) OVERRIDE { | 80 virtual void GetModelSafeRoutingInfo(ModelSafeRoutingInfo* out) OVERRIDE { |
78 out->swap(routes_); | 81 out->swap(routes_); |
79 } | 82 } |
80 | 83 |
81 StatusController* status() { return session_->status_controller(); } | 84 StatusController* status() { return session_->status_controller(); } |
82 protected: | 85 protected: |
83 void FailControllerInvocationIfDisabled(const std::string& msg) { | 86 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]); | 476 EXPECT_EQ(empty_payload, original[syncable::BOOKMARKS]); |
474 EXPECT_EQ(payload1, original[syncable::PASSWORDS]); | 477 EXPECT_EQ(payload1, original[syncable::PASSWORDS]); |
475 EXPECT_EQ(payload1, original[syncable::AUTOFILL]); | 478 EXPECT_EQ(payload1, original[syncable::AUTOFILL]); |
476 EXPECT_EQ(payload2, original[syncable::SESSIONS]); | 479 EXPECT_EQ(payload2, original[syncable::SESSIONS]); |
477 EXPECT_EQ(payload3, original[syncable::THEMES]); | 480 EXPECT_EQ(payload3, original[syncable::THEMES]); |
478 } | 481 } |
479 | 482 |
480 } // namespace | 483 } // namespace |
481 } // namespace sessions | 484 } // namespace sessions |
482 } // namespace browser_sync | 485 } // namespace browser_sync |
OLD | NEW |