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