Index: chrome/browser/chromeos/gdata/gdata_system_service.cc |
diff --git a/chrome/browser/chromeos/gdata/gdata_system_service.cc b/chrome/browser/chromeos/gdata/gdata_system_service.cc |
index fd7f7f14e9fd9a7b98c47d5d3d916b020acfefec..7b18ad0201696853413cf11218fac879dc3b4043 100644 |
--- a/chrome/browser/chromeos/gdata/gdata_system_service.cc |
+++ b/chrome/browser/chromeos/gdata/gdata_system_service.cc |
@@ -6,6 +6,7 @@ |
#include "base/bind.h" |
#include "base/bind_helpers.h" |
+#include "base/command_line.h" |
#include "chrome/browser/browser_process.h" |
#include "chrome/browser/download/download_service.h" |
#include "chrome/browser/download/download_service_factory.h" |
@@ -19,6 +20,7 @@ |
#include "chrome/browser/chromeos/gdata/gdata_util.h" |
#include "chrome/browser/profiles/profile.h" |
#include "chrome/browser/profiles/profile_dependency_manager.h" |
+#include "chrome/common/chrome_switches.h" |
#include "content/public/browser/browser_context.h" |
#include "content/public/browser/browser_thread.h" |
#include "webkit/fileapi/file_system_context.h" |
@@ -63,8 +65,15 @@ GDataSystemService::~GDataSystemService() { |
void GDataSystemService::Initialize() { |
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); |
+ |
+ if (CommandLine::ForCurrentProcess()->HasSwitch( |
+ switches::kEnableDriveV2Api)) { |
+ DVLOG(1) << "Using Drive v2 API."; |
+ use_drive_api_ = true; |
+ } |
+ |
sync_client_->Initialize(); |
- file_system_->Initialize(); |
+ file_system_->Initialize(use_drive_api_); |
cache_->RequestInitializeOnUIThread(); |
content::DownloadManager* download_manager = |