OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 "components/sync_sessions/sessions_sync_manager.h" | 5 #include "components/sync_sessions/sessions_sync_manager.h" |
6 | 6 |
7 #include <stdint.h> | 7 #include <stdint.h> |
8 | 8 |
9 #include <utility> | 9 #include <utility> |
10 | 10 |
(...skipping 169 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
180 void AddLocalChangeObserver(syncer::LocalChangeObserver* observer) override { | 180 void AddLocalChangeObserver(syncer::LocalChangeObserver* observer) override { |
181 local_change_observers_.AddObserver(observer); | 181 local_change_observers_.AddObserver(observer); |
182 } | 182 } |
183 void RemoveLocalChangeObserver( | 183 void RemoveLocalChangeObserver( |
184 syncer::LocalChangeObserver* observer) override { | 184 syncer::LocalChangeObserver* observer) override { |
185 local_change_observers_.RemoveObserver(observer); | 185 local_change_observers_.RemoveObserver(observer); |
186 } | 186 } |
187 | 187 |
188 void NotifyLocalChangeObservers() { | 188 void NotifyLocalChangeObservers() { |
189 const syncer::SyncChange empty_change; | 189 const syncer::SyncChange empty_change; |
190 FOR_EACH_OBSERVER(syncer::LocalChangeObserver, local_change_observers_, | 190 for (syncer::LocalChangeObserver& observer : local_change_observers_) |
191 OnLocalChange(NULL, empty_change)); | 191 observer.OnLocalChange(NULL, empty_change); |
192 } | 192 } |
193 | 193 |
194 void FailProcessSyncChangesWith(const syncer::SyncError& error) { | 194 void FailProcessSyncChangesWith(const syncer::SyncError& error) { |
195 error_ = error; | 195 error_ = error; |
196 } | 196 } |
197 | 197 |
198 void SetSyncDataToReturn(const syncer::SyncDataList& data) { | 198 void SetSyncDataToReturn(const syncer::SyncDataList& data) { |
199 sync_data_to_return_ = data; | 199 sync_data_to_return_ = data; |
200 } | 200 } |
201 | 201 |
(...skipping 2402 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2604 base::Time last_time; | 2604 base::Time last_time; |
2605 for (size_t i = 0; i < tabs.size(); ++i) { | 2605 for (size_t i = 0; i < tabs.size(); ++i) { |
2606 base::Time this_time = tabs[i]->timestamp; | 2606 base::Time this_time = tabs[i]->timestamp; |
2607 if (i > 0) | 2607 if (i > 0) |
2608 ASSERT_GE(last_time, this_time); | 2608 ASSERT_GE(last_time, this_time); |
2609 last_time = tabs[i]->timestamp; | 2609 last_time = tabs[i]->timestamp; |
2610 } | 2610 } |
2611 } | 2611 } |
2612 | 2612 |
2613 } // namespace sync_sessions | 2613 } // namespace sync_sessions |
OLD | NEW |