| 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/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 Loading... |
| 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 |
| OLD | NEW |