Chromium Code Reviews| OLD | NEW |
|---|---|
| 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 Loading... | |
| 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 Loading... | |
| 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_ |
| OLD | NEW |