| OLD | NEW |
| 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 #ifndef CHROME_BROWSER_MANAGED_MODE_MANAGED_USER_SERVICE_H_ | 5 #ifndef CHROME_BROWSER_MANAGED_MODE_MANAGED_USER_SERVICE_H_ |
| 6 #define CHROME_BROWSER_MANAGED_MODE_MANAGED_USER_SERVICE_H_ | 6 #define CHROME_BROWSER_MANAGED_MODE_MANAGED_USER_SERVICE_H_ |
| 7 | 7 |
| 8 #include <set> | 8 #include <set> |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| (...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 86 void GetCategoryNames(CategoryList* list); | 86 void GetCategoryNames(CategoryList* list); |
| 87 | 87 |
| 88 // Adds an access request for the given URL. The requests are stored using | 88 // Adds an access request for the given URL. The requests are stored using |
| 89 // a prefix followed by a URIEncoded version of the URL. Each entry contains | 89 // a prefix followed by a URIEncoded version of the URL. Each entry contains |
| 90 // a dictionary which currently has the timestamp of the request in it. | 90 // a dictionary which currently has the timestamp of the request in it. |
| 91 void AddAccessRequest(const GURL& url); | 91 void AddAccessRequest(const GURL& url); |
| 92 | 92 |
| 93 // Returns the email address of the custodian. | 93 // Returns the email address of the custodian. |
| 94 std::string GetCustodianEmailAddress() const; | 94 std::string GetCustodianEmailAddress() const; |
| 95 | 95 |
| 96 // Returns the name of the custodian, or the email address if the name is |
| 97 // empty. |
| 98 std::string GetCustodianName() const; |
| 99 |
| 96 // These methods allow querying and modifying the manual filtering behavior. | 100 // These methods allow querying and modifying the manual filtering behavior. |
| 97 // The manual behavior is set by the user and overrides all other settings | 101 // The manual behavior is set by the user and overrides all other settings |
| 98 // (whitelists or the default behavior). | 102 // (whitelists or the default behavior). |
| 99 | 103 |
| 100 // Returns the manual behavior for the given host. | 104 // Returns the manual behavior for the given host. |
| 101 ManualBehavior GetManualBehaviorForHost(const std::string& hostname); | 105 ManualBehavior GetManualBehaviorForHost(const std::string& hostname); |
| 102 | 106 |
| 103 // Returns the manual behavior for the given URL. | 107 // Returns the manual behavior for the given URL. |
| 104 ManualBehavior GetManualBehaviorForURL(const GURL& url); | 108 ManualBehavior GetManualBehaviorForURL(const GURL& url); |
| 105 | 109 |
| (...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 177 // network requests), so they both keep a reference to it. | 181 // network requests), so they both keep a reference to it. |
| 178 // Clients should not keep references to the UI thread filter, however | 182 // Clients should not keep references to the UI thread filter, however |
| 179 // (the filter will live as long as the profile lives, and afterwards it | 183 // (the filter will live as long as the profile lives, and afterwards it |
| 180 // should not be used anymore either). | 184 // should not be used anymore either). |
| 181 scoped_refptr<ManagedModeURLFilter> ui_url_filter_; | 185 scoped_refptr<ManagedModeURLFilter> ui_url_filter_; |
| 182 scoped_refptr<ManagedModeURLFilter> io_url_filter_; | 186 scoped_refptr<ManagedModeURLFilter> io_url_filter_; |
| 183 | 187 |
| 184 DISALLOW_COPY_AND_ASSIGN(URLFilterContext); | 188 DISALLOW_COPY_AND_ASSIGN(URLFilterContext); |
| 185 }; | 189 }; |
| 186 | 190 |
| 191 void OnCustodianProfileDownloaded(const string16& full_name); |
| 192 |
| 187 void OnManagedUserRegistered(const ProfileManager::CreateCallback& callback, | 193 void OnManagedUserRegistered(const ProfileManager::CreateCallback& callback, |
| 188 Profile* custodian_profile, | 194 Profile* custodian_profile, |
| 189 const GoogleServiceAuthError& auth_error, | 195 const GoogleServiceAuthError& auth_error, |
| 190 const std::string& token); | 196 const std::string& token); |
| 191 | 197 |
| 192 void SetupSync(); | 198 void SetupSync(); |
| 193 | 199 |
| 194 // Internal implementation for ExtensionManagementPolicy::Delegate methods. | 200 // Internal implementation for ExtensionManagementPolicy::Delegate methods. |
| 195 // If |error| is not NULL, it will be filled with an error message if the | 201 // If |error| is not NULL, it will be filled with an error message if the |
| 196 // requested extension action (install, modify status, etc.) is not permitted. | 202 // requested extension action (install, modify status, etc.) is not permitted. |
| (...skipping 29 matching lines...) Expand all Loading... |
| 226 // True iff we're waiting for the Sync service to be initialized. | 232 // True iff we're waiting for the Sync service to be initialized. |
| 227 bool waiting_for_sync_initialization_; | 233 bool waiting_for_sync_initialization_; |
| 228 | 234 |
| 229 // Sets a profile in elevated state for testing if set to true. | 235 // Sets a profile in elevated state for testing if set to true. |
| 230 bool elevated_for_testing_; | 236 bool elevated_for_testing_; |
| 231 | 237 |
| 232 URLFilterContext url_filter_context_; | 238 URLFilterContext url_filter_context_; |
| 233 }; | 239 }; |
| 234 | 240 |
| 235 #endif // CHROME_BROWSER_MANAGED_MODE_MANAGED_USER_SERVICE_H_ | 241 #endif // CHROME_BROWSER_MANAGED_MODE_MANAGED_USER_SERVICE_H_ |
| OLD | NEW |