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

Side by Side Diff: chrome/browser/chromeos/drive/change_list_loader.cc

Issue 343073003: Files.app: Provide detailed change information on onDirectoryChanged event (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 6 years, 5 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | chrome/browser/chromeos/drive/change_list_loader_observer.h » ('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 (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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/chromeos/drive/change_list_loader.h" 5 #include "chrome/browser/chromeos/drive/change_list_loader.h"
6 6
7 #include <set> 7 #include <set>
8 8
9 #include "base/callback.h" 9 #include "base/callback.h"
10 #include "base/callback_helpers.h" 10 #include "base/callback_helpers.h"
(...skipping 505 matching lines...) Expand 10 before | Expand all | Expand 10 after
516 const base::Time& start_time, 516 const base::Time& start_time,
517 FileError error) { 517 FileError error) {
518 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); 518 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
519 519
520 const base::TimeDelta elapsed = base::Time::Now() - start_time; 520 const base::TimeDelta elapsed = base::Time::Now() - start_time;
521 logger_->Log(logging::LOG_INFO, 521 logger_->Log(logging::LOG_INFO,
522 "Change lists applied (elapsed time: %sms)", 522 "Change lists applied (elapsed time: %sms)",
523 base::Int64ToString(elapsed.InMilliseconds()).c_str()); 523 base::Int64ToString(elapsed.InMilliseconds()).c_str());
524 524
525 if (should_notify_changed_directories) { 525 if (should_notify_changed_directories) {
526 for (std::set<base::FilePath>::iterator dir_iter = 526 FOR_EACH_OBSERVER(ChangeListLoaderObserver,
527 change_list_processor->changed_dirs().begin(); 527 observers_,
528 dir_iter != change_list_processor->changed_dirs().end(); 528 OnFileChanged(change_list_processor->changed_files()));
529 ++dir_iter) {
530 FOR_EACH_OBSERVER(ChangeListLoaderObserver, observers_,
531 OnDirectoryChanged(*dir_iter));
532 }
533 } 529 }
534 530
535 OnChangeListLoadComplete(error); 531 OnChangeListLoadComplete(error);
536 532
537 FOR_EACH_OBSERVER(ChangeListLoaderObserver, 533 FOR_EACH_OBSERVER(ChangeListLoaderObserver,
538 observers_, 534 observers_,
539 OnLoadFromServerComplete()); 535 OnLoadFromServerComplete());
540 } 536 }
541 537
542 } // namespace internal 538 } // namespace internal
543 } // namespace drive 539 } // namespace drive
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/chromeos/drive/change_list_loader_observer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698