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

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

Issue 165543004: Revert of Replace PO2TS::GetPrimaryAccountId() with SMB::GetAuthenticatedAccountId. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 10 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/sync_engine.cc
diff --git a/chrome/browser/sync_file_system/drive_backend/sync_engine.cc b/chrome/browser/sync_file_system/drive_backend/sync_engine.cc
index 32b34ba901764909e1943bfa357fc95f7d6e0d62..6f687d76f5b779538a527f9f2898e853b478ab20 100644
--- a/chrome/browser/sync_file_system/drive_backend/sync_engine.cc
+++ b/chrome/browser/sync_file_system/drive_backend/sync_engine.cc
@@ -19,8 +19,6 @@
#include "chrome/browser/profiles/profile.h"
#include "chrome/browser/signin/profile_oauth2_token_service.h"
#include "chrome/browser/signin/profile_oauth2_token_service_factory.h"
-#include "chrome/browser/signin/signin_manager.h"
-#include "chrome/browser/signin/signin_manager_factory.h"
#include "chrome/browser/sync_file_system/drive_backend/conflict_resolver.h"
#include "chrome/browser/sync_file_system/drive_backend/drive_backend_constants.h"
#include "chrome/browser/sync_file_system/drive_backend/list_changes_task.h"
@@ -66,11 +64,9 @@
worker_pool->GetSequenceToken(),
base::SequencedWorkerPool::SKIP_ON_SHUTDOWN));
- Profile* profile = Profile::FromBrowserContext(context);
ProfileOAuth2TokenService* token_service =
- ProfileOAuth2TokenServiceFactory::GetForProfile(profile);
- SigninManagerBase* signin_manager =
- SigninManagerFactory::GetForProfile(profile);
+ ProfileOAuth2TokenServiceFactory::GetForProfile(
+ Profile::FromBrowserContext(context));
scoped_ptr<drive::DriveServiceInterface> drive_service(
new drive::DriveAPIService(
token_service,
@@ -78,7 +74,7 @@
drive_task_runner.get(),
base_drive_url, base_download_url, wapi_base_url,
std::string() /* custom_user_agent */));
- drive_service->Initialize(signin_manager->GetAuthenticatedAccountId());
+ drive_service->Initialize(token_service->GetPrimaryAccountId());
scoped_ptr<drive::DriveUploaderInterface> drive_uploader(
new drive::DriveUploader(drive_service.get(), drive_task_runner.get()));
@@ -352,9 +348,7 @@
UpdateServiceState(REMOTE_SERVICE_OK, "Authenticated");
if (!metadata_database_ && auth_token_service_) {
- SigninManagerBase* signin_manager =
- SigninManagerFactory::GetForProfile(auth_token_service_->profile());
- drive_service_->Initialize(signin_manager->GetAuthenticatedAccountId());
+ drive_service_->Initialize(auth_token_service_->GetPrimaryAccountId());
PostInitializeTask();
return;
}
« no previous file with comments | « chrome/browser/profiles/profile_downloader.cc ('k') | chrome/browser/sync_file_system/drive_backend_v1/api_util.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698