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

Unified Diff: chrome/browser/sync_file_system/drive_backend_v1/api_util.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
« no previous file with comments | « chrome/browser/sync_file_system/drive_backend_v1/api_util.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/sync_file_system/drive_backend_v1/api_util.cc
diff --git a/chrome/browser/sync_file_system/drive_backend_v1/api_util.cc b/chrome/browser/sync_file_system/drive_backend_v1/api_util.cc
index 64911469dad4715cd8b619f793871e1528dbdbe4..ef2580b6fbddbad2a7de88edcdfdd8708e32345c 100644
--- a/chrome/browser/sync_file_system/drive_backend_v1/api_util.cc
+++ b/chrome/browser/sync_file_system/drive_backend_v1/api_util.cc
@@ -22,8 +22,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/drive_backend_constants.h"
#include "chrome/browser/sync_file_system/drive_backend_v1/drive_file_sync_util.h"
#include "chrome/browser/sync_file_system/logger.h"
@@ -159,7 +157,6 @@
APIUtil::APIUtil(Profile* profile,
const base::FilePath& temp_dir_path)
: oauth_service_(ProfileOAuth2TokenServiceFactory::GetForProfile(profile)),
- signin_manager_(SigninManagerFactory::GetForProfile(profile)),
upload_next_key_(0),
temp_dir_path_(temp_dir_path),
has_initialized_token_(false) {
@@ -186,7 +183,7 @@
std::string() /* custom_user_agent */));
}
- drive_service_->Initialize(signin_manager_->GetAuthenticatedAccountId());
+ drive_service_->Initialize(oauth_service_->GetPrimaryAccountId());
drive_service_->AddObserver(this);
has_initialized_token_ = drive_service_->HasRefreshToken();
@@ -666,7 +663,7 @@
void APIUtil::OnReadyToSendRequests() {
DCHECK(CalledOnValidThread());
if (!has_initialized_token_) {
- drive_service_->Initialize(signin_manager_->GetAuthenticatedAccountId());
+ drive_service_->Initialize(oauth_service_->GetPrimaryAccountId());
has_initialized_token_ = true;
}
FOR_EACH_OBSERVER(APIUtilObserver, observers_, OnAuthenticated());
« no previous file with comments | « chrome/browser/sync_file_system/drive_backend_v1/api_util.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698