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

Side by Side Diff: chrome/browser/extensions/api/identity/identity_signin_flow.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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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/extensions/api/identity/identity_signin_flow.h" 5 #include "chrome/browser/extensions/api/identity/identity_signin_flow.h"
6 6
7 #include "chrome/browser/app_mode/app_mode_utils.h" 7 #include "chrome/browser/app_mode/app_mode_utils.h"
8 #include "chrome/browser/signin/profile_oauth2_token_service.h" 8 #include "chrome/browser/signin/profile_oauth2_token_service.h"
9 #include "chrome/browser/signin/profile_oauth2_token_service_factory.h" 9 #include "chrome/browser/signin/profile_oauth2_token_service_factory.h"
10 #include "chrome/browser/signin/signin_manager.h"
11 #include "chrome/browser/signin/signin_manager_factory.h"
10 #include "chrome/browser/ui/webui/signin/login_ui_service.h" 12 #include "chrome/browser/ui/webui/signin/login_ui_service.h"
11 #include "chrome/browser/ui/webui/signin/login_ui_service_factory.h" 13 #include "chrome/browser/ui/webui/signin/login_ui_service_factory.h"
12 14
13 namespace extensions { 15 namespace extensions {
14 16
15 IdentitySigninFlow::IdentitySigninFlow(Delegate* delegate, Profile* profile) 17 IdentitySigninFlow::IdentitySigninFlow(Delegate* delegate, Profile* profile)
16 : delegate_(delegate), 18 : delegate_(delegate),
17 profile_(profile) { 19 profile_(profile) {
18 } 20 }
19 21
(...skipping 16 matching lines...) Expand all
36 38
37 ProfileOAuth2TokenServiceFactory::GetForProfile(profile_)->AddObserver(this); 39 ProfileOAuth2TokenServiceFactory::GetForProfile(profile_)->AddObserver(this);
38 40
39 LoginUIService* login_ui_service = 41 LoginUIService* login_ui_service =
40 LoginUIServiceFactory::GetForProfile(profile_); 42 LoginUIServiceFactory::GetForProfile(profile_);
41 login_ui_service->ShowLoginPopup(); 43 login_ui_service->ShowLoginPopup();
42 } 44 }
43 45
44 void IdentitySigninFlow::OnRefreshTokenAvailable( 46 void IdentitySigninFlow::OnRefreshTokenAvailable(
45 const std::string& account_id) { 47 const std::string& account_id) {
46 if (ProfileOAuth2TokenServiceFactory::GetForProfile(profile_)-> 48 if (SigninManagerFactory::GetForProfile(profile_)->
47 GetPrimaryAccountId() == account_id) { 49 GetAuthenticatedAccountId() == account_id) {
48 delegate_->SigninSuccess(); 50 delegate_->SigninSuccess();
49 } 51 }
50 } 52 }
51 53
52 } // namespace extensions 54 } // namespace extensions
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698