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

Side by Side Diff: chrome/browser/ui/app_list/app_list_syncable_service.cc

Issue 2424563002: Replace FOR_EACH_OBSERVER in c/b/ui/app_list with range-based for (Closed)
Patch Set: 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 | « no previous file | chrome/browser/ui/app_list/start_page_service.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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/ui/app_list/app_list_syncable_service.h" 5 #include "chrome/browser/ui/app_list/app_list_syncable_service.h"
6 6
7 #include <utility> 7 #include <utility>
8 8
9 #include "base/command_line.h" 9 #include "base/command_line.h"
10 #include "base/macros.h" 10 #include "base/macros.h"
(...skipping 309 matching lines...) Expand 10 before | Expand all | Expand 10 after
320 void AppListSyncableService::AddObserverAndStart(Observer* observer) { 320 void AppListSyncableService::AddObserverAndStart(Observer* observer) {
321 observer_list_.AddObserver(observer); 321 observer_list_.AddObserver(observer);
322 SyncStarted(); 322 SyncStarted();
323 } 323 }
324 324
325 void AppListSyncableService::RemoveObserver(Observer* observer) { 325 void AppListSyncableService::RemoveObserver(Observer* observer) {
326 observer_list_.RemoveObserver(observer); 326 observer_list_.RemoveObserver(observer);
327 } 327 }
328 328
329 void AppListSyncableService::NotifyObserversSyncUpdated() { 329 void AppListSyncableService::NotifyObserversSyncUpdated() {
330 FOR_EACH_OBSERVER(Observer, observer_list_, OnSyncModelUpdated()); 330 for (auto& observer : observer_list_)
331 observer.OnSyncModelUpdated();
331 } 332 }
332 333
333 size_t AppListSyncableService::GetNumSyncItemsForTest() { 334 size_t AppListSyncableService::GetNumSyncItemsForTest() {
334 // If the model isn't built yet, there will be no sync items. 335 // If the model isn't built yet, there will be no sync items.
335 GetModel(); 336 GetModel();
336 337
337 return sync_items_.size(); 338 return sync_items_.size();
338 } 339 }
339 340
340 void AppListSyncableService::ResetDriveAppProviderForTest() { 341 void AppListSyncableService::ResetDriveAppProviderForTest() {
(...skipping 733 matching lines...) Expand 10 before | Expand all | Expand 10 after
1074 res += " { " + item_name + " }"; 1075 res += " { " + item_name + " }";
1075 res += " [" + item_ordinal.ToDebugString() + "]"; 1076 res += " [" + item_ordinal.ToDebugString() + "]";
1076 if (!parent_id.empty()) 1077 if (!parent_id.empty())
1077 res += " <" + parent_id.substr(0, 8) + ">"; 1078 res += " <" + parent_id.substr(0, 8) + ">";
1078 res += " [" + item_pin_ordinal.ToDebugString() + "]"; 1079 res += " [" + item_pin_ordinal.ToDebugString() + "]";
1079 } 1080 }
1080 return res; 1081 return res;
1081 } 1082 }
1082 1083
1083 } // namespace app_list 1084 } // namespace app_list
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/ui/app_list/start_page_service.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698