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

Side by Side Diff: chrome/browser/extensions/api/identity/identity_signin_flow.cc

Issue 33173005: Correctly deal with tokens for supervised users in ProfileOAuth2TokenService. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix Created 7 years, 1 month 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/ui/webui/signin/login_ui_service.h" 10 #include "chrome/browser/ui/webui/signin/login_ui_service.h"
(...skipping 25 matching lines...) Expand all
36 36
37 ProfileOAuth2TokenServiceFactory::GetForProfile(profile_)->AddObserver(this); 37 ProfileOAuth2TokenServiceFactory::GetForProfile(profile_)->AddObserver(this);
38 38
39 LoginUIService* login_ui_service = 39 LoginUIService* login_ui_service =
40 LoginUIServiceFactory::GetForProfile(profile_); 40 LoginUIServiceFactory::GetForProfile(profile_);
41 login_ui_service->ShowLoginPopup(); 41 login_ui_service->ShowLoginPopup();
42 } 42 }
43 43
44 void IdentitySigninFlow::OnRefreshTokenAvailable( 44 void IdentitySigninFlow::OnRefreshTokenAvailable(
45 const std::string& account_id) { 45 const std::string& account_id) {
46 delegate_->SigninSuccess(); 46 if (ProfileOAuth2TokenServiceFactory::GetForProfile(profile_)->
47 GetPrimaryAccountId() == account_id) {
48 delegate_->SigninSuccess();
49 }
47 } 50 }
48 51
49 } // namespace extensions 52 } // namespace extensions
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698