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

Side by Side Diff: chrome/browser/managed_mode/managed_user_service.h

Issue 23376002: Move ManagedModePolicyProvider functionality to ManagedUserSettingsService. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix Created 7 years, 3 months 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) 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
11 #include "base/callback.h" 11 #include "base/callback.h"
12 #include "base/memory/scoped_ptr.h" 12 #include "base/memory/scoped_ptr.h"
13 #include "base/prefs/pref_change_registrar.h" 13 #include "base/prefs/pref_change_registrar.h"
14 #include "base/strings/string16.h" 14 #include "base/strings/string16.h"
15 #include "chrome/browser/extensions/management_policy.h" 15 #include "chrome/browser/extensions/management_policy.h"
16 #include "chrome/browser/managed_mode/managed_mode_url_filter.h" 16 #include "chrome/browser/managed_mode/managed_mode_url_filter.h"
17 #include "chrome/browser/managed_mode/managed_users.h" 17 #include "chrome/browser/managed_mode/managed_users.h"
18 #include "chrome/browser/sync/profile_sync_service_observer.h" 18 #include "chrome/browser/sync/profile_sync_service_observer.h"
19 #include "chrome/browser/ui/browser_list_observer.h" 19 #include "chrome/browser/ui/browser_list_observer.h"
20 #include "components/browser_context_keyed_service/browser_context_keyed_service .h" 20 #include "components/browser_context_keyed_service/browser_context_keyed_service .h"
21 #include "content/public/browser/notification_observer.h" 21 #include "content/public/browser/notification_observer.h"
22 #include "content/public/browser/notification_registrar.h" 22 #include "content/public/browser/notification_registrar.h"
23 #include "content/public/browser/web_contents.h" 23 #include "content/public/browser/web_contents.h"
24 24
25 class Browser; 25 class Browser;
26 class GoogleServiceAuthError; 26 class GoogleServiceAuthError;
27 class ManagedModeURLFilter; 27 class ManagedModeURLFilter;
28 class ManagedModeSiteList; 28 class ManagedModeSiteList;
29 class ManagedUserRegistrationUtility; 29 class ManagedUserRegistrationUtility;
30 class ManagedUserSettingsService;
30 class Profile; 31 class Profile;
31 32
32 namespace policy {
33 class ManagedModePolicyProvider;
34 }
35
36 namespace user_prefs { 33 namespace user_prefs {
37 class PrefRegistrySyncable; 34 class PrefRegistrySyncable;
38 } 35 }
39 36
40 // This class handles all the information related to a given managed profile 37 // This class handles all the information related to a given managed profile
41 // (e.g. the installed content packs, the default URL filtering behavior, or 38 // (e.g. the installed content packs, the default URL filtering behavior, or
42 // manual whitelist/blacklist overrides). 39 // manual whitelist/blacklist overrides).
43 class ManagedUserService : public BrowserContextKeyedService, 40 class ManagedUserService : public BrowserContextKeyedService,
44 public extensions::ManagementPolicy::Provider, 41 public extensions::ManagementPolicy::Provider,
45 public ProfileSyncServiceObserver, 42 public ProfileSyncServiceObserver,
(...skipping 177 matching lines...) Expand 10 before | Expand all | Expand 10 after
223 // Internal implementation for ExtensionManagementPolicy::Delegate methods. 220 // Internal implementation for ExtensionManagementPolicy::Delegate methods.
224 // If |error| is not NULL, it will be filled with an error message if the 221 // If |error| is not NULL, it will be filled with an error message if the
225 // requested extension action (install, modify status, etc.) is not permitted. 222 // requested extension action (install, modify status, etc.) is not permitted.
226 bool ExtensionManagementPolicyImpl(const extensions::Extension* extension, 223 bool ExtensionManagementPolicyImpl(const extensions::Extension* extension,
227 string16* error) const; 224 string16* error) const;
228 225
229 // Returns a list of all installed and enabled site lists in the current 226 // Returns a list of all installed and enabled site lists in the current
230 // managed profile. 227 // managed profile.
231 ScopedVector<ManagedModeSiteList> GetActiveSiteLists(); 228 ScopedVector<ManagedModeSiteList> GetActiveSiteLists();
232 229
233 policy::ManagedModePolicyProvider* GetPolicyProvider(); 230 ManagedUserSettingsService* GetSettingsService();
234 231
235 void OnDefaultFilteringBehaviorChanged(); 232 void OnDefaultFilteringBehaviorChanged();
236 233
237 void UpdateSiteLists(); 234 void UpdateSiteLists();
238 235
239 // Updates the manual overrides for hosts in the URL filters when the 236 // Updates the manual overrides for hosts in the URL filters when the
240 // corresponding preference is changed. 237 // corresponding preference is changed.
241 void UpdateManualHosts(); 238 void UpdateManualHosts();
242 239
243 // Updates the manual overrides for URLs in the URL filters when the 240 // Updates the manual overrides for URLs in the URL filters when the
(...skipping 25 matching lines...) Expand all
269 // 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.
270 bool elevated_for_testing_; 267 bool elevated_for_testing_;
271 268
272 // True only when |Shutdown()| method has been called. 269 // True only when |Shutdown()| method has been called.
273 bool did_shutdown_; 270 bool did_shutdown_;
274 271
275 URLFilterContext url_filter_context_; 272 URLFilterContext url_filter_context_;
276 }; 273 };
277 274
278 #endif // CHROME_BROWSER_MANAGED_MODE_MANAGED_USER_SERVICE_H_ 275 #endif // CHROME_BROWSER_MANAGED_MODE_MANAGED_USER_SERVICE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698