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

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

Issue 11775014: chromeos: Disable Drive metadata prefetch (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 11 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
« no previous file with comments | « no previous file | chrome/browser/chromeos/drive/drive_system_service_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/chromeos/drive/drive_system_service.cc
diff --git a/chrome/browser/chromeos/drive/drive_system_service.cc b/chrome/browser/chromeos/drive/drive_system_service.cc
index 9d1b88840c7766476890825b9e6ba02d99c74ffa..b4048612ac007651b97473e1beaa171ec9078393 100644
--- a/chrome/browser/chromeos/drive/drive_system_service.cc
+++ b/chrome/browser/chromeos/drive/drive_system_service.cc
@@ -5,6 +5,7 @@
#include "chrome/browser/chromeos/drive/drive_system_service.h"
#include "base/bind.h"
+#include "base/command_line.h"
#include "chrome/browser/browser_process.h"
#include "chrome/browser/chromeos/drive/drive_api_service.h"
#include "chrome/browser/chromeos/drive/drive_download_observer.h"
@@ -29,6 +30,7 @@
#include "chrome/browser/profiles/profile_dependency_manager.h"
#include "chrome/browser/sync/profile_sync_service.h"
#include "chrome/browser/sync/profile_sync_service_factory.h"
+#include "chrome/common/chrome_switches.h"
#include "chrome/common/chrome_version_info.h"
#include "chrome/common/pref_names.h"
#include "content/public/browser/browser_context.h"
@@ -323,8 +325,11 @@ void DriveSystemService::OnCacheInitialized(bool success) {
AddDriveMountPoint();
- // Start prefetching of Drive metadata.
- file_system_->StartInitialFeedFetch();
+ if (CommandLine::ForCurrentProcess()->HasSwitch(
+ switches::kEnableDriveMetadataPrefetch)) {
+ // Start prefetching of Drive metadata.
+ file_system_->StartInitialFeedFetch();
+ }
}
void DriveSystemService::DisableDrive() {
« no previous file with comments | « no previous file | chrome/browser/chromeos/drive/drive_system_service_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698