| 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);
|
|
|
|
|