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

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

Issue 15517005: Remove references to Profile from browser_context_keyed_service. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase & style Created 7 years, 7 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
(...skipping 15 matching lines...) Expand all
26 class ManagedUserRegistrationService; 26 class ManagedUserRegistrationService;
27 class Profile; 27 class Profile;
28 28
29 namespace user_prefs { 29 namespace user_prefs {
30 class PrefRegistrySyncable; 30 class PrefRegistrySyncable;
31 } 31 }
32 32
33 // This class handles all the information related to a given managed profile 33 // This class handles all the information related to a given managed profile
34 // (e.g. the installed content packs, the default URL filtering behavior, or 34 // (e.g. the installed content packs, the default URL filtering behavior, or
35 // manual whitelist/blacklist overrides). 35 // manual whitelist/blacklist overrides).
36 class ManagedUserService : public ProfileKeyedService, 36 class ManagedUserService : public BrowserContextKeyedService,
37 public extensions::ManagementPolicy::Provider, 37 public extensions::ManagementPolicy::Provider,
38 public content::NotificationObserver { 38 public content::NotificationObserver {
39 public: 39 public:
40 typedef std::vector<string16> CategoryList; 40 typedef std::vector<string16> CategoryList;
41 41
42 enum ManualBehavior { 42 enum ManualBehavior {
43 MANUAL_NONE = 0, 43 MANUAL_NONE = 0,
44 MANUAL_ALLOW, 44 MANUAL_ALLOW,
45 MANUAL_BLOCK 45 MANUAL_BLOCK
46 }; 46 };
(...skipping 152 matching lines...) Expand 10 before | Expand all | Expand 10 after
199 199
200 // Updates the manual overrides for URLs in the URL filters when the 200 // Updates the manual overrides for URLs in the URL filters when the
201 // corresponding preference is changed. 201 // corresponding preference is changed.
202 void UpdateManualURLs(); 202 void UpdateManualURLs();
203 203
204 // Returns if the passphrase to authorize as the custodian is empty. 204 // Returns if the passphrase to authorize as the custodian is empty.
205 bool IsPassphraseEmpty() const; 205 bool IsPassphraseEmpty() const;
206 206
207 base::WeakPtrFactory<ManagedUserService> weak_ptr_factory_; 207 base::WeakPtrFactory<ManagedUserService> weak_ptr_factory_;
208 208
209 // Owns us via the ProfileKeyedService mechanism. 209 // Owns us via the BrowserContextKeyedService mechanism.
210 Profile* profile_; 210 Profile* profile_;
211 211
212 content::NotificationRegistrar registrar_; 212 content::NotificationRegistrar registrar_;
213 PrefChangeRegistrar pref_change_registrar_; 213 PrefChangeRegistrar pref_change_registrar_;
214 214
215 // Stores the extension ids of the extensions which currently can be modified 215 // Stores the extension ids of the extensions which currently can be modified
216 // by the managed user. 216 // by the managed user.
217 std::set<std::string> elevated_for_extensions_; 217 std::set<std::string> elevated_for_extensions_;
218 218
219 // Sets a profile in elevated state for testing if set to true. 219 // Sets a profile in elevated state for testing if set to true.
220 bool elevated_for_testing_; 220 bool elevated_for_testing_;
221 221
222 URLFilterContext url_filter_context_; 222 URLFilterContext url_filter_context_;
223 }; 223 };
224 224
225 #endif // CHROME_BROWSER_MANAGED_MODE_MANAGED_USER_SERVICE_H_ 225 #endif // CHROME_BROWSER_MANAGED_MODE_MANAGED_USER_SERVICE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698