OLD | NEW |
1 // Copyright 2012 The Chromium Authors. All rights reserved. | 1 // Copyright 2012 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 "sync/sessions/sync_session.h" | 5 #include "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/message_loop.h" | 10 #include "base/message_loop/message_loop.h" |
(...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
97 } | 97 } |
98 virtual void OnReceivedSessionsCommitDelay( | 98 virtual void OnReceivedSessionsCommitDelay( |
99 const base::TimeDelta& new_delay) OVERRIDE { | 99 const base::TimeDelta& new_delay) OVERRIDE { |
100 FailControllerInvocationIfDisabled("OnReceivedSessionsCommitDelay"); | 100 FailControllerInvocationIfDisabled("OnReceivedSessionsCommitDelay"); |
101 } | 101 } |
102 virtual void OnReceivedClientInvalidationHintBufferSize( | 102 virtual void OnReceivedClientInvalidationHintBufferSize( |
103 int size) OVERRIDE { | 103 int size) OVERRIDE { |
104 FailControllerInvocationIfDisabled( | 104 FailControllerInvocationIfDisabled( |
105 "OnReceivedClientInvalidationHintBufferSize"); | 105 "OnReceivedClientInvalidationHintBufferSize"); |
106 } | 106 } |
107 virtual void OnShouldStopSyncingPermanently() OVERRIDE { | |
108 FailControllerInvocationIfDisabled("OnShouldStopSyncingPermanently"); | |
109 } | |
110 virtual void OnSyncProtocolError( | 107 virtual void OnSyncProtocolError( |
111 const sessions::SyncSessionSnapshot& snapshot) OVERRIDE { | 108 const sessions::SyncSessionSnapshot& snapshot) OVERRIDE { |
112 FailControllerInvocationIfDisabled("SyncProtocolError"); | 109 FailControllerInvocationIfDisabled("SyncProtocolError"); |
113 } | 110 } |
114 | 111 |
115 void GetWorkers(std::vector<ModelSafeWorker*>* out) const { | 112 void GetWorkers(std::vector<ModelSafeWorker*>* out) const { |
116 out->clear(); | 113 out->clear(); |
117 for (std::vector<scoped_refptr<ModelSafeWorker> >::const_iterator it = | 114 for (std::vector<scoped_refptr<ModelSafeWorker> >::const_iterator it = |
118 workers_.begin(); it != workers_.end(); ++it) { | 115 workers_.begin(); it != workers_.end(); ++it) { |
119 out->push_back(it->get()); | 116 out->push_back(it->get()); |
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
176 status()->set_last_download_updates_result(SYNCER_OK); | 173 status()->set_last_download_updates_result(SYNCER_OK); |
177 status()->mutable_updates_response()->mutable_get_updates() | 174 status()->mutable_updates_response()->mutable_get_updates() |
178 ->set_changes_remaining(0); | 175 ->set_changes_remaining(0); |
179 EXPECT_TRUE(status()->ServerSaysNothingMoreToDownload()); | 176 EXPECT_TRUE(status()->ServerSaysNothingMoreToDownload()); |
180 EXPECT_TRUE(status()->download_updates_succeeded()); | 177 EXPECT_TRUE(status()->download_updates_succeeded()); |
181 } | 178 } |
182 | 179 |
183 } // namespace | 180 } // namespace |
184 } // namespace sessions | 181 } // namespace sessions |
185 } // namespace syncer | 182 } // namespace syncer |
OLD | NEW |