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

Unified Diff: chrome/browser/chromeos/gdata/gdata_documents_service.cc

Issue 10693109: Use Drive v2 API: enable behind --enable-drive-api flag (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 8 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/chromeos/gdata/gdata_documents_service.cc
diff --git a/chrome/browser/chromeos/gdata/gdata_documents_service.cc b/chrome/browser/chromeos/gdata/gdata_documents_service.cc
index bf36b417cd12c27eccd54e2ba261e85fdf27d833..92c87648841efad405c1c1b65638282dd2c34d62 100644
--- a/chrome/browser/chromeos/gdata/gdata_documents_service.cc
+++ b/chrome/browser/chromeos/gdata/gdata_documents_service.cc
@@ -8,7 +8,6 @@
#include "base/bind.h"
#include "base/message_loop_proxy.h"
-#include "chrome/browser/chromeos/gdata/gdata_file_system.h"
#include "chrome/browser/chromeos/gdata/gdata_operation_runner.h"
#include "chrome/browser/chromeos/gdata/gdata_operations.h"
#include "chrome/browser/profiles/profile.h"
@@ -71,7 +70,8 @@ DocumentsServiceInterface::GetDocumentsOptions::~GetDocumentsOptions() {}
DocumentsService::DocumentsService()
: profile_(NULL),
- runner_(NULL) {
+ runner_(NULL),
+ use_drive_api_(false) {
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
}
@@ -83,8 +83,9 @@ GDataAuthService* DocumentsService::auth_service_for_testing() {
return runner_->auth_service();
}
-void DocumentsService::Initialize(Profile* profile) {
+void DocumentsService::Initialize(Profile* profile, bool use_drive_api) {
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
+ use_drive_api_ = use_drive_api;
profile_ = profile;
runner_.reset(new GDataOperationRunner(profile));
runner_->Initialize();
@@ -139,7 +140,8 @@ void DocumentsService::GetAccountMetadata(const GetDataCallback& callback) {
GetAccountMetadataOperation* operation =
new GetAccountMetadataOperation(operation_registry(),
profile_,
- callback);
+ callback,
+ use_drive_api_);
runner_->StartOperationWithRetry(operation);
}

Powered by Google App Engine
This is Rietveld 408576698