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

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

Issue 16124006: Remove dependency of WebData on notifications (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Review comments Created 7 years, 6 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/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
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
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698