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

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

Issue 10821065: Add Drive API specific operations. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: update for comments. 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
« no previous file with comments | « chrome/browser/chromeos/gdata/mock_gdata_documents_service.h ('k') | chrome/chrome_browser.gypi » ('j') | 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 ac6c67ae483883b8d4bd49103bb57db85b563631..91a6b44bb000c1d275a64a88f29ef775508de171 100644
--- a/chrome/browser/chromeos/gdata/operations_base.cc
+++ b/chrome/browser/chromeos/gdata/operations_base.cc
@@ -10,6 +10,7 @@
#include "base/stringprintf.h"
#include "base/values.h"
#include "chrome/browser/browser_process.h"
+#include "chrome/browser/chromeos/gdata/gdata_util.h"
#include "chrome/common/net/gaia/gaia_urls.h"
#include "chrome/common/net/gaia/google_service_auth_error.h"
#include "chrome/common/net/gaia/oauth2_access_token_fetcher.h"
@@ -45,6 +46,9 @@ const char kDocsListScope[] = "https://docs.google.com/feeds/";
const char kSpreadsheetsScope[] = "https://spreadsheets.google.com/feeds/";
const char kUserContentScope[] = "https://docs.googleusercontent.com/";
+// OAuth scope for Drive API.
+const char kDriveAppsScope[] = "https://www.googleapis.com/auth/drive.apps";
+
} // namespace
namespace gdata {
@@ -67,6 +71,8 @@ void AuthOperation::Start() {
scopes.push_back(kDocsListScope);
scopes.push_back(kSpreadsheetsScope);
scopes.push_back(kUserContentScope);
+ if (gdata::util::IsDriveV2ApiEnabled())
+ 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') | chrome/chrome_browser.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698