OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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_SUPERVISED_USER_SUPERVISED_USER_SERVICE_H_ | 5 #ifndef CHROME_BROWSER_SUPERVISED_USER_SUPERVISED_USER_SERVICE_H_ |
6 #define CHROME_BROWSER_SUPERVISED_USER_SUPERVISED_USER_SERVICE_H_ | 6 #define CHROME_BROWSER_SUPERVISED_USER_SUPERVISED_USER_SERVICE_H_ |
7 | 7 |
8 #include <set> | 8 #include <set> |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
(...skipping 19 matching lines...) Expand all Loading... |
30 | 30 |
31 class Browser; | 31 class Browser; |
32 class GoogleServiceAuthError; | 32 class GoogleServiceAuthError; |
33 class PermissionRequestCreator; | 33 class PermissionRequestCreator; |
34 class Profile; | 34 class Profile; |
35 class SupervisedUserRegistrationUtility; | 35 class SupervisedUserRegistrationUtility; |
36 class SupervisedUserSettingsService; | 36 class SupervisedUserSettingsService; |
37 class SupervisedUserSiteList; | 37 class SupervisedUserSiteList; |
38 class SupervisedUserURLFilter; | 38 class SupervisedUserURLFilter; |
39 | 39 |
| 40 namespace base { |
| 41 class FilePath; |
| 42 } |
| 43 |
40 namespace extensions { | 44 namespace extensions { |
41 class ExtensionRegistry; | 45 class ExtensionRegistry; |
42 } | 46 } |
43 | 47 |
44 namespace user_prefs { | 48 namespace user_prefs { |
45 class PrefRegistrySyncable; | 49 class PrefRegistrySyncable; |
46 } | 50 } |
47 | 51 |
48 // This class handles all the information related to a given supervised profile | 52 // This class handles all the information related to a given supervised profile |
49 // (e.g. the installed content packs, the default URL filtering behavior, or | 53 // (e.g. the installed content packs, the default URL filtering behavior, or |
(...skipping 16 matching lines...) Expand all Loading... |
66 MANUAL_ALLOW, | 70 MANUAL_ALLOW, |
67 MANUAL_BLOCK | 71 MANUAL_BLOCK |
68 }; | 72 }; |
69 | 73 |
70 class Delegate { | 74 class Delegate { |
71 public: | 75 public: |
72 virtual ~Delegate() {} | 76 virtual ~Delegate() {} |
73 // Returns true to indicate that the delegate handled the (de)activation, or | 77 // Returns true to indicate that the delegate handled the (de)activation, or |
74 // false to indicate that the SupervisedUserService itself should handle it. | 78 // false to indicate that the SupervisedUserService itself should handle it. |
75 virtual bool SetActive(bool active) = 0; | 79 virtual bool SetActive(bool active) = 0; |
| 80 // Returns the path to a blacklist file to load, or an empty path to |
| 81 // indicate "none". |
| 82 virtual base::FilePath GetBlacklistPath() const = 0; |
76 }; | 83 }; |
77 | 84 |
78 virtual ~SupervisedUserService(); | 85 virtual ~SupervisedUserService(); |
79 | 86 |
80 // ProfileKeyedService override: | 87 // ProfileKeyedService override: |
81 virtual void Shutdown() OVERRIDE; | 88 virtual void Shutdown() OVERRIDE; |
82 | 89 |
83 static void RegisterProfilePrefs(user_prefs::PrefRegistrySyncable* registry); | 90 static void RegisterProfilePrefs(user_prefs::PrefRegistrySyncable* registry); |
84 | 91 |
85 void SetDelegate(Delegate* delegate); | 92 void SetDelegate(Delegate* delegate); |
(...skipping 231 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
317 // Used to create permission requests. | 324 // Used to create permission requests. |
318 scoped_ptr<PermissionRequestCreator> permissions_creator_; | 325 scoped_ptr<PermissionRequestCreator> permissions_creator_; |
319 | 326 |
320 // True iff we are waiting for a permission request to be issued. | 327 // True iff we are waiting for a permission request to be issued. |
321 bool waiting_for_permissions_; | 328 bool waiting_for_permissions_; |
322 | 329 |
323 base::WeakPtrFactory<SupervisedUserService> weak_ptr_factory_; | 330 base::WeakPtrFactory<SupervisedUserService> weak_ptr_factory_; |
324 }; | 331 }; |
325 | 332 |
326 #endif // CHROME_BROWSER_SUPERVISED_USER_SUPERVISED_USER_SERVICE_H_ | 333 #endif // CHROME_BROWSER_SUPERVISED_USER_SUPERVISED_USER_SERVICE_H_ |
OLD | NEW |