| 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 <map> | 8 #include <map> |
| 9 #include <set> | 9 #include <set> |
| 10 #include <string> | 10 #include <string> |
| (...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 72 typedef base::Callback<void(bool)> SuccessCallback; | 72 typedef base::Callback<void(bool)> SuccessCallback; |
| 73 | 73 |
| 74 class Delegate { | 74 class Delegate { |
| 75 public: | 75 public: |
| 76 virtual ~Delegate() {} | 76 virtual ~Delegate() {} |
| 77 // 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 |
| 78 // false to indicate that the SupervisedUserService itself should handle it. | 78 // false to indicate that the SupervisedUserService itself should handle it. |
| 79 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 | 80 // Returns the path to a blacklist file to load, or an empty path to |
| 81 // indicate "none". | 81 // indicate "none". |
| 82 virtual base::FilePath GetBlacklistPath() const = 0; | 82 virtual base::FilePath GetBlacklistPath() const; |
| 83 // Returns the URL from which to download a blacklist if no local one exists | 83 // Returns the URL from which to download a blacklist if no local one exists |
| 84 // yet. The blacklist file will be stored at |GetBlacklistPath()|. | 84 // yet. The blacklist file will be stored at |GetBlacklistPath()|. |
| 85 virtual GURL GetBlacklistURL() const = 0; | 85 virtual GURL GetBlacklistURL() const; |
| 86 }; | 86 }; |
| 87 | 87 |
| 88 ~SupervisedUserService() override; | 88 ~SupervisedUserService() override; |
| 89 | 89 |
| 90 // ProfileKeyedService override: | 90 // ProfileKeyedService override: |
| 91 void Shutdown() override; | 91 void Shutdown() override; |
| 92 | 92 |
| 93 static void RegisterProfilePrefs(user_prefs::PrefRegistrySyncable* registry); | 93 static void RegisterProfilePrefs(user_prefs::PrefRegistrySyncable* registry); |
| 94 | 94 |
| 95 void SetDelegate(Delegate* delegate); | 95 void SetDelegate(Delegate* delegate); |
| (...skipping 255 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 351 | 351 |
| 352 // Used to create permission requests. | 352 // Used to create permission requests. |
| 353 ScopedVector<PermissionRequestCreator> permissions_creators_; | 353 ScopedVector<PermissionRequestCreator> permissions_creators_; |
| 354 | 354 |
| 355 ObserverList<SupervisedUserServiceObserver> observer_list_; | 355 ObserverList<SupervisedUserServiceObserver> observer_list_; |
| 356 | 356 |
| 357 base::WeakPtrFactory<SupervisedUserService> weak_ptr_factory_; | 357 base::WeakPtrFactory<SupervisedUserService> weak_ptr_factory_; |
| 358 }; | 358 }; |
| 359 | 359 |
| 360 #endif // CHROME_BROWSER_SUPERVISED_USER_SUPERVISED_USER_SERVICE_H_ | 360 #endif // CHROME_BROWSER_SUPERVISED_USER_SUPERVISED_USER_SERVICE_H_ |
| OLD | NEW |