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

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

Issue 8499021: UserPolicyCache only becomes ready after policy has been fetched. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Actually waits now, rebased Created 9 years, 1 month 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) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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
(...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after
91 91
92 // Initiates a user policy fetch after a successful device registration. This 92 // Initiates a user policy fetch after a successful device registration. This
93 // is only safe to call when a user device token is available. 93 // is only safe to call when a user device token is available.
94 void FetchUserPolicy(); 94 void FetchUserPolicy();
95 95
96 // Schedules initialization of the cloud policy backend services, if the 96 // Schedules initialization of the cloud policy backend services, if the
97 // services are already constructed. 97 // services are already constructed.
98 void ScheduleServiceInitialization(int64 delay_milliseconds); 98 void ScheduleServiceInitialization(int64 delay_milliseconds);
99 99
100 // Initializes the user cloud policy infrastructure. 100 // Initializes the user cloud policy infrastructure.
101 void InitializeUserPolicy(const std::string& user_name); 101 // Returns true if initialization of the user cloud policy will block Profile
102 // creation until a user policy fetch is performed.
Mattias Nissler (ping if slow) 2011/11/11 11:41:23 This return value is easy to miss and the results
Joao da Silva 2011/11/11 12:55:14 Done, in a slightly different form. The decision i
103 bool InitializeUserPolicy(const std::string& user_name);
102 104
103 // Installs a token service for user policy. 105 // Installs a token service for user policy.
104 void SetUserPolicyTokenService(TokenService* token_service); 106 void SetUserPolicyTokenService(TokenService* token_service);
105 107
106 // Registers for user policy (if not already registered), using the passed 108 // Registers for user policy (if not already registered), using the passed
107 // OAuth V2 token for authentication. 109 // OAuth V2 token for authentication. |oauth_token| can be empty to signal
110 // that an attempt to fetch the token was made but failed, or that oauth
111 // isn't being used.
108 void RegisterForUserPolicy(const std::string& oauth_token); 112 void RegisterForUserPolicy(const std::string& oauth_token);
109 113
110 const CloudPolicyDataStore* GetDeviceCloudPolicyDataStore() const; 114 const CloudPolicyDataStore* GetDeviceCloudPolicyDataStore() const;
111 const CloudPolicyDataStore* GetUserCloudPolicyDataStore() const; 115 const CloudPolicyDataStore* GetUserCloudPolicyDataStore() const;
112 116
113 const ConfigurationPolicyHandlerList* GetHandlerList() const; 117 const ConfigurationPolicyHandlerList* GetHandlerList() const;
114 118
115 private: 119 private:
116 friend class ::TestingBrowserProcess; 120 friend class ::TestingBrowserProcess;
117 121
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after
178 182
179 // Used to convert policies to preferences. 183 // Used to convert policies to preferences.
180 ConfigurationPolicyHandlerList handler_list_; 184 ConfigurationPolicyHandlerList handler_list_;
181 185
182 DISALLOW_COPY_AND_ASSIGN(BrowserPolicyConnector); 186 DISALLOW_COPY_AND_ASSIGN(BrowserPolicyConnector);
183 }; 187 };
184 188
185 } // namespace policy 189 } // namespace policy
186 190
187 #endif // CHROME_BROWSER_POLICY_BROWSER_POLICY_CONNECTOR_H_ 191 #endif // CHROME_BROWSER_POLICY_BROWSER_POLICY_CONNECTOR_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698