| OLD | NEW |
| 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/token_service.h" | 8 #include "chrome/browser/signin/token_service.h" |
| 9 #include "chrome/browser/signin/token_service_factory.h" | 9 #include "chrome/browser/signin/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" |
| 11 #include "chrome/browser/ui/webui/signin/login_ui_service_factory.h" | 11 #include "chrome/browser/ui/webui/signin/login_ui_service_factory.h" |
| 12 #include "chrome/common/chrome_notification_types.h" | 12 #include "chrome/common/chrome_notification_types.h" |
| 13 #include "content/public/browser/notification_details.h" | 13 #include "content/public/browser/notification_details.h" |
| 14 #include "content/public/browser/notification_source.h" |
| 14 #include "google_apis/gaia/gaia_constants.h" | 15 #include "google_apis/gaia/gaia_constants.h" |
| 15 | 16 |
| 16 namespace extensions { | 17 namespace extensions { |
| 17 | 18 |
| 18 IdentitySigninFlow::IdentitySigninFlow(Delegate* delegate, Profile* profile) | 19 IdentitySigninFlow::IdentitySigninFlow(Delegate* delegate, Profile* profile) |
| 19 : delegate_(delegate), | 20 : delegate_(delegate), |
| 20 profile_(profile) { | 21 profile_(profile) { |
| 21 } | 22 } |
| 22 | 23 |
| 23 IdentitySigninFlow::~IdentitySigninFlow() { | 24 IdentitySigninFlow::~IdentitySigninFlow() { |
| (...skipping 25 matching lines...) Expand all Loading... |
| 49 const content::NotificationSource& source, | 50 const content::NotificationSource& source, |
| 50 const content::NotificationDetails& details) { | 51 const content::NotificationDetails& details) { |
| 51 CHECK(type == chrome::NOTIFICATION_TOKEN_AVAILABLE); | 52 CHECK(type == chrome::NOTIFICATION_TOKEN_AVAILABLE); |
| 52 TokenService::TokenAvailableDetails* token_details = | 53 TokenService::TokenAvailableDetails* token_details = |
| 53 content::Details<TokenService::TokenAvailableDetails>(details).ptr(); | 54 content::Details<TokenService::TokenAvailableDetails>(details).ptr(); |
| 54 if (token_details->service() == GaiaConstants::kGaiaOAuth2LoginRefreshToken) | 55 if (token_details->service() == GaiaConstants::kGaiaOAuth2LoginRefreshToken) |
| 55 delegate_->SigninSuccess(token_details->token()); | 56 delegate_->SigninSuccess(token_details->token()); |
| 56 } | 57 } |
| 57 | 58 |
| 58 } // namespace extensions | 59 } // namespace extensions |
| OLD | NEW |