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

Side by Side Diff: chrome/browser/policy/browser_policy_connector.h

Issue 9404011: Explicitly wait for user policy before completing login. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 10 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 (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 #ifndef CHROME_BROWSER_POLICY_BROWSER_POLICY_CONNECTOR_H_ 5 #ifndef CHROME_BROWSER_POLICY_BROWSER_POLICY_CONNECTOR_H_
6 #define CHROME_BROWSER_POLICY_BROWSER_POLICY_CONNECTOR_H_ 6 #define CHROME_BROWSER_POLICY_BROWSER_POLICY_CONNECTOR_H_
7 #pragma once 7 #pragma once
8 8
9 #include <string> 9 #include <string>
10 10
11 #include "base/basictypes.h" 11 #include "base/basictypes.h"
12 #include "base/callback_forward.h"
12 #include "base/memory/scoped_ptr.h" 13 #include "base/memory/scoped_ptr.h"
13 #include "base/memory/weak_ptr.h" 14 #include "base/memory/weak_ptr.h"
14 #include "chrome/browser/policy/cloud_policy_constants.h" 15 #include "chrome/browser/policy/cloud_policy_constants.h"
15 #include "chrome/browser/policy/configuration_policy_handler_list.h" 16 #include "chrome/browser/policy/configuration_policy_handler_list.h"
16 #include "chrome/browser/policy/enterprise_install_attributes.h" 17 #include "chrome/browser/policy/enterprise_install_attributes.h"
17 #include "content/public/browser/notification_observer.h" 18 #include "content/public/browser/notification_observer.h"
18 #include "content/public/browser/notification_registrar.h" 19 #include "content/public/browser/notification_registrar.h"
19 20
20 class TokenService; 21 class TokenService;
21 22
(...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after
105 void RefreshPolicies(); 106 void RefreshPolicies();
106 107
107 // Schedules initialization of the cloud policy backend services, if the 108 // Schedules initialization of the cloud policy backend services, if the
108 // services are already constructed. 109 // services are already constructed.
109 void ScheduleServiceInitialization(int64 delay_milliseconds); 110 void ScheduleServiceInitialization(int64 delay_milliseconds);
110 111
111 // Initializes the user cloud policy infrastructure. 112 // Initializes the user cloud policy infrastructure.
112 // If |wait_for_policy_fetch| is true, the user policy will only become fully 113 // If |wait_for_policy_fetch| is true, the user policy will only become fully
113 // initialized after a policy fetch is attempted. Note that Profile creation 114 // initialized after a policy fetch is attempted. Note that Profile creation
114 // is blocked until this initialization is complete. 115 // is blocked until this initialization is complete.
116 // |ready_callback|, if not null, is invoked when the user policy is ready.
Mattias Nissler (ping if slow) 2012/02/16 10:24:11 Can you give some more detail on what the actual c
115 void InitializeUserPolicy(const std::string& user_name, 117 void InitializeUserPolicy(const std::string& user_name,
116 bool wait_for_policy_fetch); 118 bool wait_for_policy_fetch,
119 const base::Closure& ready_callback);
117 120
118 // Installs a token service for user policy. 121 // Installs a token service for user policy.
119 void SetUserPolicyTokenService(TokenService* token_service); 122 void SetUserPolicyTokenService(TokenService* token_service);
120 123
121 // Registers for user policy (if not already registered), using the passed 124 // Registers for user policy (if not already registered), using the passed
122 // OAuth V2 token for authentication. |oauth_token| can be empty to signal 125 // OAuth V2 token for authentication. |oauth_token| can be empty to signal
123 // that an attempt to fetch the token was made but failed, or that oauth 126 // that an attempt to fetch the token was made but failed, or that oauth
124 // isn't being used. 127 // isn't being used.
125 void RegisterForUserPolicy(const std::string& oauth_token); 128 void RegisterForUserPolicy(const std::string& oauth_token);
126 129
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after
182 185
183 // Used to convert policies to preferences. 186 // Used to convert policies to preferences.
184 ConfigurationPolicyHandlerList handler_list_; 187 ConfigurationPolicyHandlerList handler_list_;
185 188
186 DISALLOW_COPY_AND_ASSIGN(BrowserPolicyConnector); 189 DISALLOW_COPY_AND_ASSIGN(BrowserPolicyConnector);
187 }; 190 };
188 191
189 } // namespace policy 192 } // namespace policy
190 193
191 #endif // CHROME_BROWSER_POLICY_BROWSER_POLICY_CONNECTOR_H_ 194 #endif // CHROME_BROWSER_POLICY_BROWSER_POLICY_CONNECTOR_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698