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

Unified Diff: chrome/browser/chromeos/drive/drive_file_system.cc

Issue 14292002: drive: Minor cleanup around ChangeListLoader::LoadFromServerIfNeeded() (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 8 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
Index: chrome/browser/chromeos/drive/drive_file_system.cc
diff --git a/chrome/browser/chromeos/drive/drive_file_system.cc b/chrome/browser/chromeos/drive/drive_file_system.cc
index b7c8eacd017d4553c41ed410147efa3cf9a35e1b..b1f7ab54e5f8257c8412d00793e91566d9dc3314 100644
--- a/chrome/browser/chromeos/drive/drive_file_system.cc
+++ b/chrome/browser/chromeos/drive/drive_file_system.cc
@@ -257,7 +257,7 @@ void DriveFileSystem::Initialize() {
void DriveFileSystem::ReloadAfterReset() {
SetupChangeListLoader();
- change_list_loader_->LoadFromServerIfNeeded(
+ change_list_loader_->LoadIfNeeded(
kinaba 2013/04/16 08:54:28 Reload() is, at least originally, meant to be a fe
DirectoryFetchInfo(),
base::Bind(&DriveFileSystem::OnUpdateChecked,
weak_ptr_factory_.GetWeakPtr()));
@@ -272,14 +272,10 @@ void DriveFileSystem::SetupChangeListLoader() {
void DriveFileSystem::CheckForUpdates() {
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
- DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
DVLOG(1) << "CheckForUpdates";
- if (change_list_loader_ &&
- change_list_loader_->loaded() &&
- !change_list_loader_->refreshing()) {
- change_list_loader_->LoadFromServerIfNeeded(
- DirectoryFetchInfo(),
+ if (change_list_loader_) {
+ change_list_loader_->CheckForUpdates(
base::Bind(&DriveFileSystem::OnUpdateChecked,
weak_ptr_factory_.GetWeakPtr()));
}
« no previous file with comments | « chrome/browser/chromeos/drive/change_list_loader.cc ('k') | chrome/browser/chromeos/drive/drive_file_system_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698