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

Unified Diff: chrome/browser/chromeos/drive/drive_integration_service.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: Rebasing to include the update to ProfileSyncService: r224220 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/chromeos/drive/drive_integration_service.cc
diff --git a/chrome/browser/chromeos/drive/drive_integration_service.cc b/chrome/browser/chromeos/drive/drive_integration_service.cc
index 5479adbe39a82c28924f071fd0edf4d871a9f8de..aabf5002941eb0eb0fca07a6683fc034713a7567 100644
--- a/chrome/browser/chromeos/drive/drive_integration_service.cc
+++ b/chrome/browser/chromeos/drive/drive_integration_service.cc
@@ -188,7 +188,7 @@ DriveIntegrationService::DriveIntegrationService(
blocking_task_runner_ = blocking_pool->GetSequencedTaskRunner(
blocking_pool->GetSequenceToken());
- OAuth2TokenService* oauth_service =
+ ProfileOAuth2TokenService* oauth_service =
ProfileOAuth2TokenServiceFactory::GetForProfile(profile);
if (test_drive_service) {
@@ -421,7 +421,6 @@ void DriveIntegrationService::Initialize() {
DCHECK(enabled_);
state_ = INITIALIZING;
- drive_service_->Initialize();
base::PostTaskAndReplyWithResult(
blocking_task_runner_.get(),
@@ -441,6 +440,10 @@ void DriveIntegrationService::InitializeAfterMetadataInitialized(
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
DCHECK_EQ(INITIALIZING, state_);
+ drive_service_->Initialize(
+ ProfileOAuth2TokenServiceFactory::GetForProfile(profile_)->
+ GetPrimaryAccountId());
+
if (error != FILE_ERROR_OK) {
LOG(WARNING) << "Failed to initialize: " << FileErrorToString(error);

Powered by Google App Engine
This is Rietveld 408576698