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

Side by Side Diff: chrome/browser/sync/profile_sync_service.cc

Issue 150003004: Replace PO2TS::GetPrimaryAccountId() with SMB::GetAuthenticatedAccountId. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebased 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "chrome/browser/sync/profile_sync_service.h" 5 #include "chrome/browser/sync/profile_sync_service.h"
6 6
7 #include <cstddef> 7 #include <cstddef>
8 #include <map> 8 #include <map>
9 #include <set> 9 #include <set>
10 #include <utility> 10 #include <utility>
(...skipping 2211 matching lines...) Expand 10 before | Expand all | Expand 10 after
2222 2222
2223 std::string ProfileSyncService::GetAccountIdToUse() { 2223 std::string ProfileSyncService::GetAccountIdToUse() {
2224 if (profile_->IsManaged()) { 2224 if (profile_->IsManaged()) {
2225 #if defined(ENABLE_MANAGED_USERS) 2225 #if defined(ENABLE_MANAGED_USERS)
2226 return managed_users::kManagedUserPseudoEmail; 2226 return managed_users::kManagedUserPseudoEmail;
2227 #else 2227 #else
2228 NOTREACHED(); 2228 NOTREACHED();
2229 #endif 2229 #endif
2230 } 2230 }
2231 2231
2232 // TODO(fgorski): Use GetPrimaryAccountId() when it's available. 2232 return signin_->GetAuthenticatedAccountId();
2233 return signin_->GetAuthenticatedUsername();
2234 } 2233 }
2235 2234
2236 WeakHandle<syncer::JsEventHandler> ProfileSyncService::GetJsEventHandler() { 2235 WeakHandle<syncer::JsEventHandler> ProfileSyncService::GetJsEventHandler() {
2237 return MakeWeakHandle(sync_js_controller_.AsWeakPtr()); 2236 return MakeWeakHandle(sync_js_controller_.AsWeakPtr());
2238 } 2237 }
2239 2238
2240 syncer::SyncableService* ProfileSyncService::GetSessionsSyncableService() { 2239 syncer::SyncableService* ProfileSyncService::GetSessionsSyncableService() {
2241 return sessions_sync_manager_.get(); 2240 return sessions_sync_manager_.get();
2242 } 2241 }
2243 2242
(...skipping 12 matching lines...) Expand all
2256 status.last_get_token_error = last_get_token_error_; 2255 status.last_get_token_error = last_get_token_error_;
2257 if (request_access_token_retry_timer_.IsRunning()) 2256 if (request_access_token_retry_timer_.IsRunning())
2258 status.next_token_request_time = next_token_request_time_; 2257 status.next_token_request_time = next_token_request_time_;
2259 return status; 2258 return status;
2260 } 2259 }
2261 2260
2262 void ProfileSyncService::OverrideNetworkResourcesForTest( 2261 void ProfileSyncService::OverrideNetworkResourcesForTest(
2263 scoped_ptr<syncer::NetworkResources> network_resources) { 2262 scoped_ptr<syncer::NetworkResources> network_resources) {
2264 network_resources_ = network_resources.Pass(); 2263 network_resources_ = network_resources.Pass();
2265 } 2264 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698