| 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 126 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 137 // addresses (like Sync), even though we're not signed in. | 137 // addresses (like Sync), even though we're not signed in. |
| 138 static const char* GetManagedUserPseudoEmail(); | 138 static const char* GetManagedUserPseudoEmail(); |
| 139 | 139 |
| 140 void set_elevated_for_testing(bool skip) { | 140 void set_elevated_for_testing(bool skip) { |
| 141 elevated_for_testing_ = skip; | 141 elevated_for_testing_ = skip; |
| 142 } | 142 } |
| 143 | 143 |
| 144 void AddNavigationBlockedCallback(const NavigationBlockedCallback& callback); | 144 void AddNavigationBlockedCallback(const NavigationBlockedCallback& callback); |
| 145 void DidBlockNavigation(content::WebContents* web_contents); | 145 void DidBlockNavigation(content::WebContents* web_contents); |
| 146 | 146 |
| 147 void AddInitCallback(const base::Closure& callback); |
| 148 |
| 147 // extensions::ManagementPolicy::Provider implementation: | 149 // extensions::ManagementPolicy::Provider implementation: |
| 148 virtual std::string GetDebugPolicyProviderName() const OVERRIDE; | 150 virtual std::string GetDebugPolicyProviderName() const OVERRIDE; |
| 149 virtual bool UserMayLoad(const extensions::Extension* extension, | 151 virtual bool UserMayLoad(const extensions::Extension* extension, |
| 150 string16* error) const OVERRIDE; | 152 string16* error) const OVERRIDE; |
| 151 virtual bool UserMayModifySettings(const extensions::Extension* extension, | 153 virtual bool UserMayModifySettings(const extensions::Extension* extension, |
| 152 string16* error) const OVERRIDE; | 154 string16* error) const OVERRIDE; |
| 153 | 155 |
| 154 // ProfileSyncServiceObserver implementation: | 156 // ProfileSyncServiceObserver implementation: |
| 155 virtual void OnStateChanged() OVERRIDE; | 157 virtual void OnStateChanged() OVERRIDE; |
| 156 | 158 |
| (...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 250 // Owns us via the BrowserContextKeyedService mechanism. | 252 // Owns us via the BrowserContextKeyedService mechanism. |
| 251 Profile* profile_; | 253 Profile* profile_; |
| 252 | 254 |
| 253 content::NotificationRegistrar registrar_; | 255 content::NotificationRegistrar registrar_; |
| 254 PrefChangeRegistrar pref_change_registrar_; | 256 PrefChangeRegistrar pref_change_registrar_; |
| 255 | 257 |
| 256 // True iff we're waiting for the Sync service to be initialized. | 258 // True iff we're waiting for the Sync service to be initialized. |
| 257 bool waiting_for_sync_initialization_; | 259 bool waiting_for_sync_initialization_; |
| 258 bool is_profile_active_; | 260 bool is_profile_active_; |
| 259 | 261 |
| 262 std::vector<base::Closure> init_callbacks_; |
| 263 |
| 260 std::vector<NavigationBlockedCallback> navigation_blocked_callbacks_; | 264 std::vector<NavigationBlockedCallback> navigation_blocked_callbacks_; |
| 261 | 265 |
| 262 // Sets a profile in elevated state for testing if set to true. | 266 // Sets a profile in elevated state for testing if set to true. |
| 263 bool elevated_for_testing_; | 267 bool elevated_for_testing_; |
| 264 | 268 |
| 265 // True only when |Shutdown()| method has been called. | 269 // True only when |Shutdown()| method has been called. |
| 266 bool did_shutdown_; | 270 bool did_shutdown_; |
| 267 | 271 |
| 268 URLFilterContext url_filter_context_; | 272 URLFilterContext url_filter_context_; |
| 269 }; | 273 }; |
| 270 | 274 |
| 271 #endif // CHROME_BROWSER_MANAGED_MODE_MANAGED_USER_SERVICE_H_ | 275 #endif // CHROME_BROWSER_MANAGED_MODE_MANAGED_USER_SERVICE_H_ |
| OLD | NEW |