blob: 892a747ce76c266c2e9a3dbc283ad334304de1d9 [file] [log] [blame]
[email protected]cce15bb2014-06-17 13:43:511// Copyright 2014 The Chromium Authors. All rights reserved.
[email protected]0850e842013-01-19 03:44:312// Use of this source code is governed by a BSD-style license that can be
3// found in the LICENSE file.
4
[email protected]cce15bb2014-06-17 13:43:515#ifndef CHROME_BROWSER_SUPERVISED_USER_SUPERVISED_USER_SERVICE_H_
6#define CHROME_BROWSER_SUPERVISED_USER_SUPERVISED_USER_SERVICE_H_
[email protected]0850e842013-01-19 03:44:317
treib950c6e82014-09-23 13:07:298#include <map>
treib950c6e82014-09-23 13:07:299#include <string>
[email protected]0850e842013-01-19 03:44:3110#include <vector>
11
[email protected]438f7e12013-08-07 06:59:0012#include "base/callback.h"
[email protected]076ebeda2014-06-06 21:47:2613#include "base/gtest_prod_util.h"
[email protected]a581ea22013-05-06 12:34:1914#include "base/memory/scoped_ptr.h"
treibab0a39e2014-09-24 14:48:2815#include "base/observer_list.h"
[email protected]1ab137b2013-03-21 03:33:1816#include "base/prefs/pref_change_registrar.h"
[email protected]f2253ac2014-05-28 08:37:2117#include "base/scoped_observer.h"
[email protected]f9b294362013-06-10 20:22:3118#include "base/strings/string16.h"
treib4edbded2014-09-05 08:43:5519#include "chrome/browser/supervised_user/experimental/supervised_user_blacklist.h"
[email protected]cce15bb2014-06-17 13:43:5120#include "chrome/browser/supervised_user/supervised_user_url_filter.h"
21#include "chrome/browser/supervised_user/supervised_users.h"
[email protected]a243d644c2013-06-20 18:37:5522#include "chrome/browser/sync/profile_sync_service_observer.h"
[email protected]3a276ff2014-08-12 14:22:0923#include "chrome/browser/sync/sync_type_preference_provider.h"
[email protected]514fcf22013-08-13 06:37:2424#include "chrome/browser/ui/browser_list_observer.h"
[email protected]12b7af32014-03-13 05:28:2025#include "components/keyed_service/core/keyed_service.h"
[email protected]c14a6802014-07-11 21:51:1226
27#if defined(ENABLE_EXTENSIONS)
[email protected]f2253ac2014-05-28 08:37:2128#include "extensions/browser/extension_registry_observer.h"
[email protected]301116c62013-11-26 10:37:4529#include "extensions/browser/management_policy.h"
[email protected]c14a6802014-07-11 21:51:1230#endif
[email protected]0850e842013-01-19 03:44:3131
[email protected]509ad1a92013-03-19 21:41:0632class Browser;
[email protected]acfcfbb2013-05-13 18:01:2733class GoogleServiceAuthError;
[email protected]4db65f952014-05-20 15:46:3034class PermissionRequestCreator;
[email protected]0850e842013-01-19 03:44:3135class Profile;
treibf136dfb2014-09-25 17:37:4736class SupervisedUserBlacklistDownloader;
[email protected]cce15bb2014-06-17 13:43:5137class SupervisedUserRegistrationUtility;
treibab0a39e2014-09-24 14:48:2838class SupervisedUserServiceObserver;
[email protected]cce15bb2014-06-17 13:43:5139class SupervisedUserSettingsService;
40class SupervisedUserSiteList;
41class SupervisedUserURLFilter;
bauerb4da36132014-12-26 19:53:1342class SupervisedUserWhitelistService;
[email protected]0850e842013-01-19 03:44:3143
treibdaece84f2014-09-05 12:58:1544namespace base {
45class FilePath;
46}
47
treib565a0192014-12-04 13:17:3148namespace content {
49class WebContents;
50}
51
[email protected]f2253ac2014-05-28 08:37:2152namespace extensions {
53class ExtensionRegistry;
54}
55
treib9e4fab902014-10-29 14:25:2656namespace net {
57class URLRequestContextGetter;
58}
59
[email protected]443e9312013-05-06 06:17:3460namespace user_prefs {
61class PrefRegistrySyncable;
62}
63
[email protected]cce15bb2014-06-17 13:43:5164// This class handles all the information related to a given supervised profile
[email protected]0850e842013-01-19 03:44:3165// (e.g. the installed content packs, the default URL filtering behavior, or
66// manual whitelist/blacklist overrides).
[email protected]cce15bb2014-06-17 13:43:5167class SupervisedUserService : public KeyedService,
[email protected]c14a6802014-07-11 21:51:1268#if defined(ENABLE_EXTENSIONS)
[email protected]cce15bb2014-06-17 13:43:5169 public extensions::ManagementPolicy::Provider,
[email protected]cce15bb2014-06-17 13:43:5170 public extensions::ExtensionRegistryObserver,
[email protected]c14a6802014-07-11 21:51:1271#endif
[email protected]3a276ff2014-08-12 14:22:0972 public SyncTypePreferenceProvider,
[email protected]c14a6802014-07-11 21:51:1273 public ProfileSyncServiceObserver,
bauerbce9a1a82014-12-18 13:34:2474 public chrome::BrowserListObserver,
75 public SupervisedUserURLFilter::Observer {
[email protected]0850e842013-01-19 03:44:3176 public:
[email protected]d2065e062013-12-12 23:49:5277 typedef std::vector<base::string16> CategoryList;
[email protected]438f7e12013-08-07 06:59:0078 typedef base::Callback<void(content::WebContents*)> NavigationBlockedCallback;
[email protected]514fcf22013-08-13 06:37:2479 typedef base::Callback<void(const GoogleServiceAuthError&)> AuthErrorCallback;
bauerb646019b12014-10-16 16:23:0980 typedef base::Callback<void(bool)> SuccessCallback;
[email protected]0850e842013-01-19 03:44:3181
[email protected]f085fdd52014-06-11 18:09:2082 class Delegate {
83 public:
84 virtual ~Delegate() {}
85 // Returns true to indicate that the delegate handled the (de)activation, or
[email protected]cce15bb2014-06-17 13:43:5186 // false to indicate that the SupervisedUserService itself should handle it.
[email protected]f085fdd52014-06-11 18:09:2087 virtual bool SetActive(bool active) = 0;
treibdaece84f2014-09-05 12:58:1588 // Returns the path to a blacklist file to load, or an empty path to
89 // indicate "none".
treib38983df2014-10-24 09:35:1290 virtual base::FilePath GetBlacklistPath() const;
treibf136dfb2014-09-25 17:37:4791 // Returns the URL from which to download a blacklist if no local one exists
92 // yet. The blacklist file will be stored at |GetBlacklistPath()|.
treib38983df2014-10-24 09:35:1293 virtual GURL GetBlacklistURL() const;
treib9e4fab902014-10-29 14:25:2694 // Returns the identifier ("cx") of the Custom Search Engine to use for the
95 // experimental "SafeSites" feature, or the empty string to disable the
96 // feature.
97 virtual std::string GetSafeSitesCx() const;
[email protected]f085fdd52014-06-11 18:09:2098 };
99
dchengc072fff2014-10-21 11:39:05100 ~SupervisedUserService() override;
[email protected]0850e842013-01-19 03:44:31101
[email protected]a243d644c2013-06-20 18:37:55102 // ProfileKeyedService override:
dchengc072fff2014-10-21 11:39:05103 void Shutdown() override;
[email protected]a243d644c2013-06-20 18:37:55104
[email protected]37ca3fe02013-07-05 15:32:44105 static void RegisterProfilePrefs(user_prefs::PrefRegistrySyncable* registry);
[email protected]0850e842013-01-19 03:44:31106
[email protected]f085fdd52014-06-11 18:09:20107 void SetDelegate(Delegate* delegate);
108
[email protected]0850e842013-01-19 03:44:31109 // Returns the URL filter for the IO thread, for filtering network requests
[email protected]cce15bb2014-06-17 13:43:51110 // (in SupervisedUserResourceThrottle).
111 scoped_refptr<const SupervisedUserURLFilter> GetURLFilterForIOThread();
[email protected]0850e842013-01-19 03:44:31112
113 // Returns the URL filter for the UI thread, for filtering navigations and
114 // classifying sites in the history view.
[email protected]cce15bb2014-06-17 13:43:51115 SupervisedUserURLFilter* GetURLFilterForUIThread();
[email protected]0850e842013-01-19 03:44:31116
bauerb4da36132014-12-26 19:53:13117 // Returns the whitelist service.
118 SupervisedUserWhitelistService* GetWhitelistService();
119
[email protected]0850e842013-01-19 03:44:31120 // Returns the URL's category, obtained from the installed content packs.
121 int GetCategory(const GURL& url);
122
123 // Returns the list of all known human-readable category names, sorted by ID
124 // number. Called in the critical path of drawing the history UI, so needs to
125 // be fast.
126 void GetCategoryNames(CategoryList* list);
127
[email protected]0369d6ab2013-08-09 01:52:59128 // Whether the user can request access to blocked URLs.
129 bool AccessRequestsEnabled();
130
[email protected]e861bba2013-06-17 15:20:54131 // Adds an access request for the given URL. The requests are stored using
132 // a prefix followed by a URIEncoded version of the URL. Each entry contains
133 // a dictionary which currently has the timestamp of the request in it.
bauerb646019b12014-10-16 16:23:09134 void AddAccessRequest(const GURL& url, const SuccessCallback& callback);
[email protected]e861bba2013-06-17 15:20:54135
[email protected]a9c2d642013-05-31 14:37:14136 // Returns the email address of the custodian.
137 std::string GetCustodianEmailAddress() const;
138
[email protected]fae057a2013-06-21 22:46:08139 // Returns the name of the custodian, or the email address if the name is
140 // empty.
141 std::string GetCustodianName() const;
142
treib3e7ecf72014-10-24 16:44:07143 // Returns the email address of the second custodian, or the empty string
144 // if there is no second custodian.
145 std::string GetSecondCustodianEmailAddress() const;
146
147 // Returns the name of the second custodian, or the email address if the name
148 // is empty, or the empty string is there is no second custodian.
149 std::string GetSecondCustodianName() const;
150
[email protected]0850e842013-01-19 03:44:31151 // Initializes this object. This method does nothing if the profile is not
[email protected]cce15bb2014-06-17 13:43:51152 // supervised.
[email protected]0850e842013-01-19 03:44:31153 void Init();
154
[email protected]a243d644c2013-06-20 18:37:55155 // Initializes this profile for syncing, using the provided |refresh_token| to
156 // mint access tokens for Sync.
157 void InitSync(const std::string& refresh_token);
[email protected]acfcfbb2013-05-13 18:01:27158
[email protected]cce15bb2014-06-17 13:43:51159 // Convenience method that registers this supervised user using
[email protected]458d59442013-08-01 14:19:32160 // |registration_utility| and initializes sync with the returned token.
161 // The |callback| will be called when registration is complete,
[email protected]3a276ff2014-08-12 14:22:09162 // whether it succeeded or not -- unless registration was cancelled manually,
[email protected]458d59442013-08-01 14:19:32163 // in which case the callback will be ignored.
[email protected]cce15bb2014-06-17 13:43:51164 void RegisterAndInitSync(
165 SupervisedUserRegistrationUtility* registration_utility,
166 Profile* custodian_profile,
167 const std::string& supervised_user_id,
168 const AuthErrorCallback& callback);
[email protected]acfcfbb2013-05-13 18:01:27169
[email protected]4f02aac12013-05-20 05:19:06170 void set_elevated_for_testing(bool skip) {
171 elevated_for_testing_ = skip;
[email protected]849749d2013-05-06 17:30:45172 }
173
[email protected]438f7e12013-08-07 06:59:00174 void AddNavigationBlockedCallback(const NavigationBlockedCallback& callback);
175 void DidBlockNavigation(content::WebContents* web_contents);
176
treibab0a39e2014-09-24 14:48:28177 void AddObserver(SupervisedUserServiceObserver* observer);
178 void RemoveObserver(SupervisedUserServiceObserver* observer);
179
treib531fc7312014-12-09 12:49:20180 void AddPermissionRequestCreator(
181 scoped_ptr<PermissionRequestCreator> creator);
bauerb646019b12014-10-16 16:23:09182
[email protected]c14a6802014-07-11 21:51:12183#if defined(ENABLE_EXTENSIONS)
[email protected]ce019142013-02-12 18:08:10184 // extensions::ManagementPolicy::Provider implementation:
dchengc072fff2014-10-21 11:39:05185 std::string GetDebugPolicyProviderName() const override;
186 bool UserMayLoad(const extensions::Extension* extension,
187 base::string16* error) const override;
188 bool UserMayModifySettings(const extensions::Extension* extension,
189 base::string16* error) const override;
[email protected]0850e842013-01-19 03:44:31190
[email protected]f2253ac2014-05-28 08:37:21191 // extensions::ExtensionRegistryObserver implementation.
dchengc072fff2014-10-21 11:39:05192 void OnExtensionLoaded(content::BrowserContext* browser_context,
193 const extensions::Extension* extension) override;
194 void OnExtensionUnloaded(
[email protected]f2253ac2014-05-28 08:37:21195 content::BrowserContext* browser_context,
196 const extensions::Extension* extension,
mostynbfb66cb4f2014-10-07 09:15:42197 extensions::UnloadedExtensionInfo::Reason reason) override;
[email protected]c14a6802014-07-11 21:51:12198#endif
199
[email protected]3a276ff2014-08-12 14:22:09200 // SyncTypePreferenceProvider implementation:
dchengc072fff2014-10-21 11:39:05201 syncer::ModelTypeSet GetPreferredDataTypes() const override;
[email protected]3a276ff2014-08-12 14:22:09202
[email protected]c14a6802014-07-11 21:51:12203 // ProfileSyncServiceObserver implementation:
dchengc072fff2014-10-21 11:39:05204 void OnStateChanged() override;
[email protected]0850e842013-01-19 03:44:31205
[email protected]dfddd022013-07-10 17:29:48206 // chrome::BrowserListObserver implementation:
dchengc072fff2014-10-21 11:39:05207 void OnBrowserSetLastActive(Browser* browser) override;
[email protected]dfddd022013-07-10 17:29:48208
bauerbce9a1a82014-12-18 13:34:24209 // SupervisedUserURLFilter::Observer implementation:
210 void OnSiteListUpdated() override;
211
[email protected]0850e842013-01-19 03:44:31212 private:
[email protected]cce15bb2014-06-17 13:43:51213 friend class SupervisedUserServiceExtensionTestBase;
214 friend class SupervisedUserServiceFactory;
pvalenzuelac2ca4582014-10-14 19:24:57215 FRIEND_TEST_ALL_PREFIXES(SingleClientSupervisedUserSettingsSyncTest, Sanity);
[email protected]cce15bb2014-06-17 13:43:51216 FRIEND_TEST_ALL_PREFIXES(SupervisedUserServiceTest, ClearOmitOnRegistration);
fhorschig1f351f02014-09-30 12:30:22217 FRIEND_TEST_ALL_PREFIXES(SupervisedUserServiceTest,
218 ChangesIncludedSessionOnChangedSettings);
219 FRIEND_TEST_ALL_PREFIXES(SupervisedUserServiceTest,
220 ChangesSyncSessionStateOnChangedSettings);
[email protected]cce15bb2014-06-17 13:43:51221 // A bridge from the UI thread to the SupervisedUserURLFilters, one of which
222 // lives on the IO thread. This class mediates access to them and makes sure
223 // they are kept in sync.
[email protected]0850e842013-01-19 03:44:31224 class URLFilterContext {
225 public:
226 URLFilterContext();
227 ~URLFilterContext();
228
[email protected]cce15bb2014-06-17 13:43:51229 SupervisedUserURLFilter* ui_url_filter() const;
230 SupervisedUserURLFilter* io_url_filter() const;
[email protected]0850e842013-01-19 03:44:31231
232 void SetDefaultFilteringBehavior(
[email protected]cce15bb2014-06-17 13:43:51233 SupervisedUserURLFilter::FilteringBehavior behavior);
234 void LoadWhitelists(ScopedVector<SupervisedUserSiteList> site_lists);
bauerbce9a1a82014-12-18 13:34:24235 void LoadBlacklist(const base::FilePath& path,
236 const base::Closure& callback);
[email protected]5e022292013-02-06 16:42:17237 void SetManualHosts(scoped_ptr<std::map<std::string, bool> > host_map);
238 void SetManualURLs(scoped_ptr<std::map<GURL, bool> > url_map);
[email protected]0850e842013-01-19 03:44:31239
treib9e4fab902014-10-29 14:25:26240 void InitAsyncURLChecker(net::URLRequestContextGetter* context,
treibe81fd0f2014-11-24 12:35:48241 const std::string& cx);
treib9e4fab902014-10-29 14:25:26242
[email protected]0850e842013-01-19 03:44:31243 private:
bauerbce9a1a82014-12-18 13:34:24244 void OnBlacklistLoaded(const base::Closure& callback);
treib4edbded2014-09-05 08:43:55245
[email protected]cce15bb2014-06-17 13:43:51246 // SupervisedUserURLFilter is refcounted because the IO thread filter is
247 // used both by ProfileImplIOData and OffTheRecordProfileIOData (to filter
[email protected]0850e842013-01-19 03:44:31248 // network requests), so they both keep a reference to it.
249 // Clients should not keep references to the UI thread filter, however
250 // (the filter will live as long as the profile lives, and afterwards it
251 // should not be used anymore either).
[email protected]cce15bb2014-06-17 13:43:51252 scoped_refptr<SupervisedUserURLFilter> ui_url_filter_;
253 scoped_refptr<SupervisedUserURLFilter> io_url_filter_;
[email protected]0850e842013-01-19 03:44:31254
treib4edbded2014-09-05 08:43:55255 SupervisedUserBlacklist blacklist_;
256
[email protected]0850e842013-01-19 03:44:31257 DISALLOW_COPY_AND_ASSIGN(URLFilterContext);
258 };
259
[email protected]cce15bb2014-06-17 13:43:51260 // Use |SupervisedUserServiceFactory::GetForProfile(..)| to get
[email protected]3bf45d02013-07-10 00:03:41261 // an instance of this service.
[email protected]cce15bb2014-06-17 13:43:51262 explicit SupervisedUserService(Profile* profile);
[email protected]3bf45d02013-07-10 00:03:41263
[email protected]f085fdd52014-06-11 18:09:20264 void SetActive(bool active);
265
[email protected]0085863a2013-12-06 21:19:03266 void OnCustodianProfileDownloaded(const base::string16& full_name);
[email protected]200729f82013-06-22 07:05:55267
[email protected]cce15bb2014-06-17 13:43:51268 void OnSupervisedUserRegistered(const AuthErrorCallback& callback,
269 Profile* custodian_profile,
270 const GoogleServiceAuthError& auth_error,
271 const std::string& token);
[email protected]acfcfbb2013-05-13 18:01:27272
[email protected]a243d644c2013-06-20 18:37:55273 void SetupSync();
[email protected]6e08b9a62014-07-08 00:32:48274 void StartSetupSync();
275 void FinishSetupSyncWhenReady();
276 void FinishSetupSync();
[email protected]a243d644c2013-06-20 18:37:55277
[email protected]cce15bb2014-06-17 13:43:51278 bool ProfileIsSupervised() const;
[email protected]e000daf2013-07-31 16:50:58279
treib3fce4e92014-09-26 16:06:25280 void OnCustodianInfoChanged();
281
[email protected]c14a6802014-07-11 21:51:12282#if defined(ENABLE_EXTENSIONS)
[email protected]0850e842013-01-19 03:44:31283 // Internal implementation for ExtensionManagementPolicy::Delegate methods.
284 // If |error| is not NULL, it will be filled with an error message if the
285 // requested extension action (install, modify status, etc.) is not permitted.
[email protected]38b7fb92013-07-26 16:32:26286 bool ExtensionManagementPolicyImpl(const extensions::Extension* extension,
[email protected]0085863a2013-12-06 21:19:03287 base::string16* error) const;
[email protected]0850e842013-01-19 03:44:31288
289 // Returns a list of all installed and enabled site lists in the current
[email protected]cce15bb2014-06-17 13:43:51290 // supervised profile.
291 ScopedVector<SupervisedUserSiteList> GetActiveSiteLists();
[email protected]0850e842013-01-19 03:44:31292
[email protected]c14a6802014-07-11 21:51:12293 // Extensions helper to SetActive().
294 void SetExtensionsActive();
295#endif
296
[email protected]cce15bb2014-06-17 13:43:51297 SupervisedUserSettingsService* GetSettingsService();
[email protected]e861bba2013-06-17 15:20:54298
bauerbd3a36cc42014-10-01 13:05:49299 size_t FindEnabledPermissionRequestCreator(size_t start);
bauerb646019b12014-10-16 16:23:09300 void AddAccessRequestInternal(const GURL& url,
301 const SuccessCallback& callback,
302 size_t index);
303 void OnPermissionRequestIssued(const GURL& url,
304 const SuccessCallback& callback,
305 size_t index,
306 bool success);
bauerbd3a36cc42014-10-01 13:05:49307
[email protected]cce15bb2014-06-17 13:43:51308 void OnSupervisedUserIdChanged();
[email protected]f085fdd52014-06-11 18:09:20309
[email protected]0850e842013-01-19 03:44:31310 void OnDefaultFilteringBehaviorChanged();
311
312 void UpdateSiteLists();
313
treibf136dfb2014-09-25 17:37:47314 // Asynchronously downloads a static blacklist file from |url|, stores it at
315 // |path|, loads it, and applies it to the URL filters. If |url| is not valid
316 // (e.g. empty), directly tries to load from |path|.
317 void LoadBlacklist(const base::FilePath& path, const GURL& url);
318
treib4edbded2014-09-05 08:43:55319 // Asynchronously loads a static blacklist from a binary file at |path| and
320 // applies it to the URL filters.
treibf136dfb2014-09-25 17:37:47321 void LoadBlacklistFromFile(const base::FilePath& path);
322
323 void OnBlacklistDownloadDone(const base::FilePath& path, bool success);
treib4edbded2014-09-05 08:43:55324
bauerbce9a1a82014-12-18 13:34:24325 void OnBlacklistLoaded();
326
[email protected]5e022292013-02-06 16:42:17327 // Updates the manual overrides for hosts in the URL filters when the
328 // corresponding preference is changed.
329 void UpdateManualHosts();
[email protected]0850e842013-01-19 03:44:31330
[email protected]5e022292013-02-06 16:42:17331 // Updates the manual overrides for URLs in the URL filters when the
332 // corresponding preference is changed.
333 void UpdateManualURLs();
[email protected]0850e842013-01-19 03:44:31334
[email protected]0b4c6b22014-08-04 09:46:31335 // Returns the human readable name of the supervised user.
336 std::string GetSupervisedUserName() const;
337
fhorschig1f351f02014-09-30 12:30:22338 // Subscribes to the SupervisedUserPrefStore, refreshes
339 // |includes_sync_sessions_type_| and triggers reconfiguring the
340 // ProfileSyncService.
341 void OnHistoryRecordingStateChanged();
342
343 // Returns true if the syncer::SESSIONS type should be included in Sync.
344 bool IncludesSyncSessionsType() const;
345
346 // The option a custodian sets to either record or prevent recording the
347 // supervised user's history. Set by |FetchNewSessionSyncState()| and
348 // defaults to true.
349 bool includes_sync_sessions_type_;
350
[email protected]12b7af32014-03-13 05:28:20351 // Owns us via the KeyedService mechanism.
[email protected]0850e842013-01-19 03:44:31352 Profile* profile_;
353
[email protected]f085fdd52014-06-11 18:09:20354 bool active_;
355
356 Delegate* delegate_;
357
[email protected]c14a6802014-07-11 21:51:12358#if defined(ENABLE_EXTENSIONS)
[email protected]f2253ac2014-05-28 08:37:21359 ScopedObserver<extensions::ExtensionRegistry,
360 extensions::ExtensionRegistryObserver>
361 extension_registry_observer_;
[email protected]c14a6802014-07-11 21:51:12362#endif
[email protected]f2253ac2014-05-28 08:37:21363
[email protected]0850e842013-01-19 03:44:31364 PrefChangeRegistrar pref_change_registrar_;
365
[email protected]a243d644c2013-06-20 18:37:55366 // True iff we're waiting for the Sync service to be initialized.
367 bool waiting_for_sync_initialization_;
[email protected]dfddd022013-07-10 17:29:48368 bool is_profile_active_;
[email protected]a243d644c2013-06-20 18:37:55369
[email protected]438f7e12013-08-07 06:59:00370 std::vector<NavigationBlockedCallback> navigation_blocked_callbacks_;
371
[email protected]4f02aac12013-05-20 05:19:06372 // Sets a profile in elevated state for testing if set to true.
373 bool elevated_for_testing_;
[email protected]849749d2013-05-06 17:30:45374
[email protected]3a276ff2014-08-12 14:22:09375 // True only when |Init()| method has been called.
376 bool did_init_;
377
[email protected]3bf45d02013-07-10 00:03:41378 // True only when |Shutdown()| method has been called.
379 bool did_shutdown_;
380
[email protected]0850e842013-01-19 03:44:31381 URLFilterContext url_filter_context_;
treibf136dfb2014-09-25 17:37:47382 scoped_ptr<SupervisedUserBlacklistDownloader> blacklist_downloader_;
[email protected]8052b242013-11-15 16:40:55383
bauerb4da36132014-12-26 19:53:13384 scoped_ptr<SupervisedUserWhitelistService> whitelist_service_;
385
[email protected]4db65f952014-05-20 15:46:30386 // Used to create permission requests.
bauerbd3a36cc42014-10-01 13:05:49387 ScopedVector<PermissionRequestCreator> permissions_creators_;
[email protected]4db65f952014-05-20 15:46:30388
treibab0a39e2014-09-24 14:48:28389 ObserverList<SupervisedUserServiceObserver> observer_list_;
390
[email protected]cce15bb2014-06-17 13:43:51391 base::WeakPtrFactory<SupervisedUserService> weak_ptr_factory_;
[email protected]0850e842013-01-19 03:44:31392};
393
[email protected]cce15bb2014-06-17 13:43:51394#endif // CHROME_BROWSER_SUPERVISED_USER_SUPERVISED_USER_SERVICE_H_