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

Side by Side Diff: chrome/browser/chromeos/policy/user_cloud_policy_token_forwarder.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
« no previous file with comments | « no previous file | chrome/browser/extensions/api/identity/identity_signin_flow.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 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/chromeos/policy/user_cloud_policy_token_forwarder.h" 5 #include "chrome/browser/chromeos/policy/user_cloud_policy_token_forwarder.h"
6 6
7 #include "base/logging.h" 7 #include "base/logging.h"
8 #include "chrome/browser/chromeos/policy/user_cloud_policy_manager_chromeos.h" 8 #include "chrome/browser/chromeos/policy/user_cloud_policy_manager_chromeos.h"
9 #include "chrome/browser/signin/token_service.h" 9 #include "chrome/browser/signin/token_service.h"
10 #include "chrome/common/chrome_notification_types.h" 10 #include "chrome/common/chrome_notification_types.h"
11 #include "content/public/browser/notification_source.h"
11 12
12 namespace policy { 13 namespace policy {
13 14
14 UserCloudPolicyTokenForwarder::UserCloudPolicyTokenForwarder( 15 UserCloudPolicyTokenForwarder::UserCloudPolicyTokenForwarder(
15 UserCloudPolicyManagerChromeOS* manager, 16 UserCloudPolicyManagerChromeOS* manager,
16 TokenService* token_service) 17 TokenService* token_service)
17 : manager_(manager), 18 : manager_(manager),
18 token_service_(token_service) { 19 token_service_(token_service) {
19 if (token_service_->HasOAuthLoginToken()) { 20 if (token_service_->HasOAuthLoginToken()) {
20 manager_->OnRefreshTokenAvailable( 21 manager_->OnRefreshTokenAvailable(
(...skipping 17 matching lines...) Expand all
38 const content::NotificationDetails& details) { 39 const content::NotificationDetails& details) {
39 DCHECK(type == chrome::NOTIFICATION_TOKEN_AVAILABLE); 40 DCHECK(type == chrome::NOTIFICATION_TOKEN_AVAILABLE);
40 if (token_service_->HasOAuthLoginToken()) { 41 if (token_service_->HasOAuthLoginToken()) {
41 registrar_.RemoveAll(); 42 registrar_.RemoveAll();
42 manager_->OnRefreshTokenAvailable( 43 manager_->OnRefreshTokenAvailable(
43 token_service_->GetOAuth2LoginRefreshToken()); 44 token_service_->GetOAuth2LoginRefreshToken());
44 } 45 }
45 } 46 }
46 47
47 } // namespace policy 48 } // namespace policy
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/extensions/api/identity/identity_signin_flow.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698