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

Unified Diff: components/drive/chromeos/change_list_loader.cc

Issue 2421083002: Replace FOR_EACH_OBSERVER in components/drive 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | components/drive/chromeos/directory_loader.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/drive/chromeos/change_list_loader.cc
diff --git a/components/drive/chromeos/change_list_loader.cc b/components/drive/chromeos/change_list_loader.cc
index e2bb5b313c51ea1c06ee45db3c2fb5de9b30d57e..8c47f6f20a2ffeb79f5aa62381ec5759a05c2925 100644
--- a/components/drive/chromeos/change_list_loader.cc
+++ b/components/drive/chromeos/change_list_loader.cc
@@ -456,9 +456,8 @@ void ChangeListLoader::OnChangeListLoadComplete(FileError error) {
if (!loaded_ && error == FILE_ERROR_OK) {
loaded_ = true;
- FOR_EACH_OBSERVER(ChangeListLoaderObserver,
- observers_,
- OnInitialLoadComplete());
+ for (auto& observer : observers_)
+ observer.OnInitialLoadComplete();
}
for (size_t i = 0; i < pending_load_callback_.size(); ++i) {
@@ -568,16 +567,14 @@ void ChangeListLoader::LoadChangeListFromServerAfterUpdate(
base::Int64ToString(elapsed.InMilliseconds()).c_str());
if (should_notify_changed_directories) {
- FOR_EACH_OBSERVER(ChangeListLoaderObserver,
- observers_,
- OnFileChanged(change_list_processor->changed_files()));
+ for (auto& observer : observers_)
+ observer.OnFileChanged(change_list_processor->changed_files());
}
OnChangeListLoadComplete(error);
- FOR_EACH_OBSERVER(ChangeListLoaderObserver,
- observers_,
- OnLoadFromServerComplete());
+ for (auto& observer : observers_)
+ observer.OnLoadFromServerComplete();
}
} // namespace internal
« no previous file with comments | « no previous file | components/drive/chromeos/directory_loader.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698