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

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

Issue 11280140: Pass calls to GetApplicationInfo through the scheduler (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix unit test Created 8 years 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/drive_scheduler.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/drive_feed_loader.h" 5 #include "chrome/browser/chromeos/drive/drive_feed_loader.h"
6 6
7 #include <set> 7 #include <set>
8 8
9 #include "base/command_line.h" 9 #include "base/command_line.h"
10 #include "base/file_util.h" 10 #include "base/file_util.h"
(...skipping 282 matching lines...) Expand 10 before | Expand all | Expand 10 after
293 // Sets the refreshing flag, so that the caller does not send refresh requests 293 // Sets the refreshing flag, so that the caller does not send refresh requests
294 // in parallel (see DriveFileSystem::CheckForUpdates). Corresponding 294 // in parallel (see DriveFileSystem::CheckForUpdates). Corresponding
295 // "refresh_ = false" is in OnGetAccountMetadata when the cached feed is up to 295 // "refresh_ = false" is in OnGetAccountMetadata when the cached feed is up to
296 // date, or in OnFeedFromServerLoaded called back from LoadFromServer(). 296 // date, or in OnFeedFromServerLoaded called back from LoadFromServer().
297 refreshing_ = true; 297 refreshing_ = true;
298 298
299 if (google_apis::util::IsDriveV2ApiEnabled()) { 299 if (google_apis::util::IsDriveV2ApiEnabled()) {
300 // Drive v2 needs a separate application list fetch operation. 300 // Drive v2 needs a separate application list fetch operation.
301 // TODO(haruki): Application list rarely changes and is not necessarily 301 // TODO(haruki): Application list rarely changes and is not necessarily
302 // refreshed as often as files. 302 // refreshed as often as files.
303 drive_service_->GetApplicationInfo( 303 scheduler_->GetApplicationInfo(
304 base::Bind(&DriveFeedLoader::OnGetApplicationList, 304 base::Bind(&DriveFeedLoader::OnGetApplicationList,
305 weak_ptr_factory_.GetWeakPtr())); 305 weak_ptr_factory_.GetWeakPtr()));
306 } 306 }
307 307
308 // First fetch the latest changestamp to see if there were any new changes 308 // First fetch the latest changestamp to see if there were any new changes
309 // there at all. 309 // there at all.
310 drive_service_->GetAccountMetadata( 310 drive_service_->GetAccountMetadata(
311 base::Bind(&DriveFeedLoader::OnGetAccountMetadata, 311 base::Bind(&DriveFeedLoader::OnGetAccountMetadata,
312 weak_ptr_factory_.GetWeakPtr(), 312 weak_ptr_factory_.GetWeakPtr(),
313 callback)); 313 callback));
(...skipping 582 matching lines...) Expand 10 before | Expand all | Expand 10 after
896 896
897 // Run the callback now that the filesystem is ready. 897 // Run the callback now that the filesystem is ready.
898 load_finished_callback.Run(DRIVE_FILE_OK); 898 load_finished_callback.Run(DRIVE_FILE_OK);
899 899
900 FOR_EACH_OBSERVER(DriveFeedLoaderObserver, 900 FOR_EACH_OBSERVER(DriveFeedLoaderObserver,
901 observers_, 901 observers_,
902 OnFeedFromServerLoaded()); 902 OnFeedFromServerLoaded());
903 } 903 }
904 904
905 } // namespace drive 905 } // namespace drive
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/chromeos/drive/drive_scheduler.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698