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

Unified Diff: chrome/browser/extensions/api/push_messaging/push_messaging_api.cc

Issue 144013009: Extensions: 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/extensions/api/identity/identity_signin_flow.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/extensions/api/push_messaging/push_messaging_api.cc
diff --git a/chrome/browser/extensions/api/push_messaging/push_messaging_api.cc b/chrome/browser/extensions/api/push_messaging/push_messaging_api.cc
index 651281c77f81218c2341295206e7c00a294cc825..a8604ff21c43b5e0f5cd71b33bef6c8dfda9804c 100644
--- a/chrome/browser/extensions/api/push_messaging/push_messaging_api.cc
+++ b/chrome/browser/extensions/api/push_messaging/push_messaging_api.cc
@@ -22,6 +22,8 @@
#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/ui/webui/signin/login_ui_service_factory.h"
#include "chrome/common/extensions/api/push_messaging.h"
#include "content/public/browser/browser_thread.h"
@@ -124,8 +126,10 @@ void PushMessagingGetChannelIdFunction::StartAccessTokenFetch() {
OAuth2TokenService::ScopeSet scopes(scope_vector.begin(), scope_vector.end());
ProfileOAuth2TokenService* token_service =
ProfileOAuth2TokenServiceFactory::GetForProfile(GetProfile());
+ SigninManagerBase* signin_manager =
+ SigninManagerFactory::GetForProfile(GetProfile());
fetcher_access_token_request_ = token_service->StartRequest(
- token_service->GetPrimaryAccountId(), scopes, this);
+ signin_manager->GetAuthenticatedAccountId(), scopes, this);
}
void PushMessagingGetChannelIdFunction::OnRefreshTokenAvailable(
@@ -188,8 +192,10 @@ void PushMessagingGetChannelIdFunction::StartGaiaIdFetch(
bool PushMessagingGetChannelIdFunction::IsUserLoggedIn() const {
ProfileOAuth2TokenService* token_service =
ProfileOAuth2TokenServiceFactory::GetForProfile(GetProfile());
dcheng 2014/02/04 22:37:21 Can all references to POA2TSF be deleted from this
Roger Tawa OOO till Jul 10th 2014/02/05 01:00:49 Nope. You can see that the token service is still
+ SigninManagerBase* signin_manager =
+ SigninManagerFactory::GetForProfile(GetProfile());
return token_service->RefreshTokenIsAvailable(
- token_service->GetPrimaryAccountId());
+ signin_manager->GetAuthenticatedAccountId());
}
void PushMessagingGetChannelIdFunction::ReportResult(
« no previous file with comments | « chrome/browser/extensions/api/identity/identity_signin_flow.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698