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

Side by Side Diff: components/drive/chromeos/directory_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 unified diff | Download patch
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/drive/chromeos/directory_loader.h" 5 #include "components/drive/chromeos/directory_loader.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 #include <utility> 8 #include <utility>
9 9
10 #include "base/callback.h" 10 #include "base/callback.h"
(...skipping 543 matching lines...) Expand 10 before | Expand all | Expand 10 after
554 const DirectoryFetchInfo& directory_fetch_info, 554 const DirectoryFetchInfo& directory_fetch_info,
555 const base::FilePath* directory_path, 555 const base::FilePath* directory_path,
556 FileError error) { 556 FileError error) {
557 DCHECK(thread_checker_.CalledOnValidThread()); 557 DCHECK(thread_checker_.CalledOnValidThread());
558 558
559 DVLOG(1) << "Directory loaded: " << directory_fetch_info.ToString(); 559 DVLOG(1) << "Directory loaded: " << directory_fetch_info.ToString();
560 OnDirectoryLoadComplete(directory_fetch_info.local_id(), error); 560 OnDirectoryLoadComplete(directory_fetch_info.local_id(), error);
561 561
562 // Also notify the observers. 562 // Also notify the observers.
563 if (error == FILE_ERROR_OK && !directory_path->empty()) { 563 if (error == FILE_ERROR_OK && !directory_path->empty()) {
564 FOR_EACH_OBSERVER(ChangeListLoaderObserver, 564 for (auto& observer : observers_)
565 observers_, 565 observer.OnDirectoryReloaded(*directory_path);
566 OnDirectoryReloaded(*directory_path));
567 } 566 }
568 } 567 }
569 568
570 } // namespace internal 569 } // namespace internal
571 } // namespace drive 570 } // namespace drive
OLDNEW
« no previous file with comments | « components/drive/chromeos/change_list_loader.cc ('k') | components/drive/chromeos/file_system.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698