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

Side by Side Diff: chrome/browser/policy/cloud/user_policy_signin_service_base.cc

Issue 502343002: Add account_id to signin manager notifications. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@isauth
Patch Set: Fix android trybots Created 6 years, 3 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
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/policy/cloud/user_policy_signin_service_base.h" 5 #include "chrome/browser/policy/cloud/user_policy_signin_service_base.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/message_loop/message_loop.h" 8 #include "base/message_loop/message_loop.h"
9 #include "chrome/browser/chrome_notification_types.h" 9 #include "chrome/browser/chrome_notification_types.h"
10 #include "chrome/browser/policy/cloud/user_cloud_policy_manager_factory.h" 10 #include "chrome/browser/policy/cloud/user_cloud_policy_manager_factory.h"
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
63 UserCloudPolicyManager* manager = policy_manager(); 63 UserCloudPolicyManager* manager = policy_manager();
64 DCHECK(manager); 64 DCHECK(manager);
65 DCHECK(!manager->core()->client()); 65 DCHECK(!manager->core()->client());
66 InitializeUserCloudPolicyManager(username, client.Pass()); 66 InitializeUserCloudPolicyManager(username, client.Pass());
67 DCHECK(manager->IsClientRegistered()); 67 DCHECK(manager->IsClientRegistered());
68 68
69 // Now initiate a policy fetch. 69 // Now initiate a policy fetch.
70 manager->core()->service()->RefreshPolicy(callback); 70 manager->core()->service()->RefreshPolicy(callback);
71 } 71 }
72 72
73 void UserPolicySigninServiceBase::GoogleSignedOut(const std::string& username) { 73 void UserPolicySigninServiceBase::GoogleSignedOut(const std::string& account_id,
74 const std::string& username) {
74 ShutdownUserCloudPolicyManager(); 75 ShutdownUserCloudPolicyManager();
75 } 76 }
76 77
77 void UserPolicySigninServiceBase::Observe( 78 void UserPolicySigninServiceBase::Observe(
78 int type, 79 int type,
79 const content::NotificationSource& source, 80 const content::NotificationSource& source,
80 const content::NotificationDetails& details) { 81 const content::NotificationDetails& details) {
81 switch (type) { 82 switch (type) {
82 case chrome::NOTIFICATION_PROFILE_ADDED: 83 case chrome::NOTIFICATION_PROFILE_ADDED:
83 // A new profile has been loaded - if it's signed in, then initialize the 84 // A new profile has been loaded - if it's signed in, then initialize the
(...skipping 177 matching lines...) Expand 10 before | Expand all | Expand 10 after
261 } 262 }
262 263
263 scoped_refptr<net::URLRequestContextGetter> 264 scoped_refptr<net::URLRequestContextGetter>
264 UserPolicySigninServiceBase::CreateUserRequestContext( 265 UserPolicySigninServiceBase::CreateUserRequestContext(
265 scoped_refptr<net::URLRequestContextGetter> profile_request_context) { 266 scoped_refptr<net::URLRequestContextGetter> profile_request_context) {
266 return new UserPolicyRequestContext( 267 return new UserPolicyRequestContext(
267 profile_request_context, system_request_context(), GetUserAgent()); 268 profile_request_context, system_request_context(), GetUserAgent());
268 } 269 }
269 270
270 } // namespace policy 271 } // namespace policy
OLDNEW
« no previous file with comments | « chrome/browser/policy/cloud/user_policy_signin_service_base.h ('k') | chrome/browser/profiles/gaia_info_update_service.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698