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

Side by Side Diff: chrome/browser/chromeos/gdata/operations_base.cc

Issue 10832201: Use auth/drive scope, instead of auth/drive.file scope (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "chrome/browser/chromeos/gdata/operations_base.h" 5 #include "chrome/browser/chromeos/gdata/operations_base.h"
6 6
7 #include "base/json/json_reader.h" 7 #include "base/json/json_reader.h"
8 #include "base/metrics/histogram.h" 8 #include "base/metrics/histogram.h"
9 #include "base/string_number_conversions.h" 9 #include "base/string_number_conversions.h"
10 #include "base/stringprintf.h" 10 #include "base/stringprintf.h"
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
43 43
44 // OAuth scope for the documents API. 44 // OAuth scope for the documents API.
45 const char kDocsListScope[] = "https://docs.google.com/feeds/"; 45 const char kDocsListScope[] = "https://docs.google.com/feeds/";
46 const char kSpreadsheetsScope[] = "https://spreadsheets.google.com/feeds/"; 46 const char kSpreadsheetsScope[] = "https://spreadsheets.google.com/feeds/";
47 const char kUserContentScope[] = "https://docs.googleusercontent.com/"; 47 const char kUserContentScope[] = "https://docs.googleusercontent.com/";
48 48
49 // OAuth scope for the Contacts API. 49 // OAuth scope for the Contacts API.
50 const char kContactsScope[] = "https://www.google.com/m8/feeds/"; 50 const char kContactsScope[] = "https://www.google.com/m8/feeds/";
51 51
52 // OAuth scope for Drive API. 52 // OAuth scope for Drive API.
53 const char kDriveScope[] = "https://www.googleapis.com/auth/drive.file"; 53 const char kDriveScope[] = "https://www.googleapis.com/auth/drive";
54 const char kDriveAppsScope[] = "https://www.googleapis.com/auth/drive.apps"; 54 const char kDriveAppsScope[] = "https://www.googleapis.com/auth/drive.apps";
55 const char kDriveAppsReadonlyScope[] = 55 const char kDriveAppsReadonlyScope[] =
56 "https://www.googleapis.com/auth/drive.apps.readonly"; 56 "https://www.googleapis.com/auth/drive.apps.readonly";
57 57
58 // Parse JSON string to base::Value object. 58 // Parse JSON string to base::Value object.
59 void ParseJsonOnBlockingPool(const std::string& data, 59 void ParseJsonOnBlockingPool(const std::string& data,
60 scoped_ptr<base::Value>* value) { 60 scoped_ptr<base::Value>* value) {
61 DCHECK(!BrowserThread::CurrentlyOn(BrowserThread::UI)); 61 DCHECK(!BrowserThread::CurrentlyOn(BrowserThread::UI));
62 62
63 int error_code = -1; 63 int error_code = -1;
(...skipping 377 matching lines...) Expand 10 before | Expand all | Expand 10 after
441 } 441 }
442 442
443 void GetDataOperation::RunCallback(GDataErrorCode fetch_error_code, 443 void GetDataOperation::RunCallback(GDataErrorCode fetch_error_code,
444 scoped_ptr<base::Value> value) { 444 scoped_ptr<base::Value> value) {
445 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); 445 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
446 if (!callback_.is_null()) 446 if (!callback_.is_null())
447 callback_.Run(fetch_error_code, value.Pass()); 447 callback_.Run(fetch_error_code, value.Pass());
448 } 448 }
449 449
450 } // namespace gdata 450 } // namespace gdata
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698