Index: chrome/browser/chromeos/gdata/gdata_operations.cc |
diff --git a/chrome/browser/chromeos/gdata/gdata_operations.cc b/chrome/browser/chromeos/gdata/gdata_operations.cc |
index be05e1e2350404e33edbaf50ef3618128468a289..8e9961cbdc56aa5c2f2f52bcd1cab74bd68394f8 100644 |
--- a/chrome/browser/chromeos/gdata/gdata_operations.cc |
+++ b/chrome/browser/chromeos/gdata/gdata_operations.cc |
@@ -67,6 +67,9 @@ const char kGetDocumentEntryURLFormat[] = |
const char kAccountMetadataURL[] = |
"https://docs.google.com/feeds/metadata/default"; |
+const char kDriveV2AboutURL[] = |
+ "https://www.googleapis.com/drive/v2/about"; |
+ |
const char kUploadContentRange[] = "Content-Range: bytes "; |
const char kUploadContentType[] = "X-Upload-Content-Type: "; |
const char kUploadContentLength[] = "X-Upload-Content-Length: "; |
@@ -96,6 +99,13 @@ 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 Google Drive v2 API |
+// See https://developers.google.com/drive/scopes. |
+// Tokens with scope https://docs.google.com/feeds are accepted and treated |
+// the same as tokens with scope https://www.googleapis.com/auth/drive and |
+// this is not necessary for the migration period. |
+const char kDriveScope[] = "https://www.googleapis.com/auth/drive"; |
+ |
// Adds additional parameters for API version, output content type and to show |
// folders in the feed are added to document feed URLs. |
GURL AddStandardUrlParams(const GURL& url) { |
@@ -573,7 +583,8 @@ GetAccountMetadataOperation::GetAccountMetadataOperation( |
GetAccountMetadataOperation::~GetAccountMetadataOperation() {} |
GURL GetAccountMetadataOperation::GetURL() const { |
- return AddMetadataUrlParams(GURL(kAccountMetadataURL)); |
+ return gdata::util::IsDriveV2ApiEnabled() ? |
+ GURL(kDriveV2AboutURL) : AddMetadataUrlParams(GURL(kAccountMetadataURL)); |
} |
satorux1
2012/07/12 07:49:06
Not sure if it's worth sharing GetAccountMetadataO
kochi
2012/07/13 10:33:52
gdata_operations.cc split is done:
https://src.chr
|
//============================ DownloadFileOperation =========================== |