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

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

Issue 10836125: Add GetChangelist operation for Drive V2. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Remove SetURL() and specify url in the constructor. Created 8 years, 4 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 | « chrome/browser/chromeos/gdata/mock_gdata_documents_service.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/chromeos/gdata/operations_base.cc
diff --git a/chrome/browser/chromeos/gdata/operations_base.cc b/chrome/browser/chromeos/gdata/operations_base.cc
index 46220a186fde4490fbca7d3b19f1d0644d8fbdfe..b2a1d46c7dc999b98f120b85428f930f4487285f 100644
--- a/chrome/browser/chromeos/gdata/operations_base.cc
+++ b/chrome/browser/chromeos/gdata/operations_base.cc
@@ -50,7 +50,10 @@ const char kUserContentScope[] = "https://docs.googleusercontent.com/";
const char kContactsScope[] = "https://www.google.com/m8/feeds/";
// OAuth scope for Drive API.
+const char kDriveScope[] = "https://www.googleapis.com/auth/drive.file";
const char kDriveAppsScope[] = "https://www.googleapis.com/auth/drive.apps";
+const char kDriveAppsReadonlyScope[] =
+ "https://www.googleapis.com/auth/drive.apps.readonly";
// Parse JSON string to base::Value object.
void ParseJsonOnBlockingPool(const std::string& data,
@@ -92,12 +95,17 @@ AuthOperation::~AuthOperation() {}
void AuthOperation::Start() {
DCHECK(!refresh_token_.empty());
std::vector<std::string> scopes;
- scopes.push_back(kDocsListScope);
- scopes.push_back(kSpreadsheetsScope);
- scopes.push_back(kUserContentScope);
- scopes.push_back(kContactsScope);
- // Drive App scope is required for even WAPI v3 apps access.
- scopes.push_back(kDriveAppsScope);
+ if (gdata::util::IsDriveV2ApiEnabled()) {
+ scopes.push_back(kDriveScope);
+ scopes.push_back(kDriveAppsReadonlyScope);
+ } else {
+ scopes.push_back(kDocsListScope);
+ scopes.push_back(kSpreadsheetsScope);
+ scopes.push_back(kUserContentScope);
+ scopes.push_back(kContactsScope);
+ // Drive App scope is required for even WAPI v3 apps access.
+ scopes.push_back(kDriveAppsScope);
+ }
oauth2_access_token_fetcher_.reset(new OAuth2AccessTokenFetcher(
this, g_browser_process->system_request_context()));
NotifyStart();
« no previous file with comments | « chrome/browser/chromeos/gdata/mock_gdata_documents_service.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698