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

Unified Diff: chrome/browser/sync_file_system/drive_backend/api_util.cc

Issue 23382008: Making OAuth2TokenService multi-login aware, updating callers, minor fixes (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fixing a unit test, addressing comments from courage@ Created 7 years, 3 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/sync_file_system/drive_backend/api_util.cc
diff --git a/chrome/browser/sync_file_system/drive_backend/api_util.cc b/chrome/browser/sync_file_system/drive_backend/api_util.cc
index 050b141f0aabc33f441d14c9b2378a39c9776cb1..ce8ce6524356888fc82108aa58b8374b52e73397 100644
--- a/chrome/browser/sync_file_system/drive_backend/api_util.cc
+++ b/chrome/browser/sync_file_system/drive_backend/api_util.cc
@@ -168,11 +168,12 @@ APIUtil::APIUtil(Profile* profile,
kBaseDownloadUrlForProduction)),
upload_next_key_(0),
temp_dir_path_(temp_dir_path) {
- OAuth2TokenService* oauth_service =
+ ProfileOAuth2TokenService* oauth_service =
ProfileOAuth2TokenServiceFactory::GetForProfile(profile);
if (IsDriveAPIDisabled()) {
drive_service_.reset(new drive::GDataWapiService(
oauth_service,
+ oauth_service->GetPrimaryAccountId(),
profile->GetRequestContext(),
content::BrowserThread::GetBlockingPool(),
GURL(google_apis::GDataWapiUrlGenerator::kBaseUrlForProduction),
@@ -181,6 +182,7 @@ APIUtil::APIUtil(Profile* profile,
} else {
drive_service_.reset(new drive::DriveAPIService(
oauth_service,
+ oauth_service->GetPrimaryAccountId(),
profile->GetRequestContext(),
content::BrowserThread::GetBlockingPool(),
GURL(google_apis::DriveApiUrlGenerator::kBaseUrlForProduction),

Powered by Google App Engine
This is Rietveld 408576698