Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(206)

Side by Side Diff: chrome/browser/sync/sessions/sessions_sync_manager_unittest.cc

Issue 2435533004: Reduce usage of FOR_EACH_OBSERVER macro in chrome/browser/signin (Closed)
Patch Set: braces Created 4 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « chrome/browser/status_icons/status_icon_menu_model.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « chrome/browser/status_icons/status_icon_menu_model.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698