| 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 75 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 86 // indicate "none". | 86 // indicate "none". |
| 87 virtual base::FilePath GetBlacklistPath() const = 0; | 87 virtual base::FilePath GetBlacklistPath() const = 0; |
| 88 // Returns the URL from which to download a blacklist if no local one exists | 88 // Returns the URL from which to download a blacklist if no local one exists |
| 89 // yet. The blacklist file will be stored at |GetBlacklistPath()|. | 89 // yet. The blacklist file will be stored at |GetBlacklistPath()|. |
| 90 virtual GURL GetBlacklistURL() const = 0; | 90 virtual GURL GetBlacklistURL() const = 0; |
| 91 }; | 91 }; |
| 92 | 92 |
| 93 virtual ~SupervisedUserService(); | 93 virtual ~SupervisedUserService(); |
| 94 | 94 |
| 95 // ProfileKeyedService override: | 95 // ProfileKeyedService override: |
| 96 virtual void Shutdown() OVERRIDE; | 96 virtual void Shutdown() override; |
| 97 | 97 |
| 98 static void RegisterProfilePrefs(user_prefs::PrefRegistrySyncable* registry); | 98 static void RegisterProfilePrefs(user_prefs::PrefRegistrySyncable* registry); |
| 99 | 99 |
| 100 void SetDelegate(Delegate* delegate); | 100 void SetDelegate(Delegate* delegate); |
| 101 | 101 |
| 102 // Returns the URL filter for the IO thread, for filtering network requests | 102 // Returns the URL filter for the IO thread, for filtering network requests |
| 103 // (in SupervisedUserResourceThrottle). | 103 // (in SupervisedUserResourceThrottle). |
| 104 scoped_refptr<const SupervisedUserURLFilter> GetURLFilterForIOThread(); | 104 scoped_refptr<const SupervisedUserURLFilter> GetURLFilterForIOThread(); |
| 105 | 105 |
| 106 // Returns the URL filter for the UI thread, for filtering navigations and | 106 // Returns the URL filter for the UI thread, for filtering navigations and |
| (...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 168 } | 168 } |
| 169 | 169 |
| 170 void AddNavigationBlockedCallback(const NavigationBlockedCallback& callback); | 170 void AddNavigationBlockedCallback(const NavigationBlockedCallback& callback); |
| 171 void DidBlockNavigation(content::WebContents* web_contents); | 171 void DidBlockNavigation(content::WebContents* web_contents); |
| 172 | 172 |
| 173 void AddObserver(SupervisedUserServiceObserver* observer); | 173 void AddObserver(SupervisedUserServiceObserver* observer); |
| 174 void RemoveObserver(SupervisedUserServiceObserver* observer); | 174 void RemoveObserver(SupervisedUserServiceObserver* observer); |
| 175 | 175 |
| 176 #if defined(ENABLE_EXTENSIONS) | 176 #if defined(ENABLE_EXTENSIONS) |
| 177 // extensions::ManagementPolicy::Provider implementation: | 177 // extensions::ManagementPolicy::Provider implementation: |
| 178 virtual std::string GetDebugPolicyProviderName() const OVERRIDE; | 178 virtual std::string GetDebugPolicyProviderName() const override; |
| 179 virtual bool UserMayLoad(const extensions::Extension* extension, | 179 virtual bool UserMayLoad(const extensions::Extension* extension, |
| 180 base::string16* error) const OVERRIDE; | 180 base::string16* error) const override; |
| 181 virtual bool UserMayModifySettings(const extensions::Extension* extension, | 181 virtual bool UserMayModifySettings(const extensions::Extension* extension, |
| 182 base::string16* error) const OVERRIDE; | 182 base::string16* error) const override; |
| 183 | 183 |
| 184 // extensions::ExtensionRegistryObserver implementation. | 184 // extensions::ExtensionRegistryObserver implementation. |
| 185 virtual void OnExtensionLoaded( | 185 virtual void OnExtensionLoaded( |
| 186 content::BrowserContext* browser_context, | 186 content::BrowserContext* browser_context, |
| 187 const extensions::Extension* extension) OVERRIDE; | 187 const extensions::Extension* extension) override; |
| 188 virtual void OnExtensionUnloaded( | 188 virtual void OnExtensionUnloaded( |
| 189 content::BrowserContext* browser_context, | 189 content::BrowserContext* browser_context, |
| 190 const extensions::Extension* extension, | 190 const extensions::Extension* extension, |
| 191 extensions::UnloadedExtensionInfo::Reason reason) OVERRIDE; | 191 extensions::UnloadedExtensionInfo::Reason reason) override; |
| 192 #endif | 192 #endif |
| 193 | 193 |
| 194 // SyncTypePreferenceProvider implementation: | 194 // SyncTypePreferenceProvider implementation: |
| 195 virtual syncer::ModelTypeSet GetPreferredDataTypes() const OVERRIDE; | 195 virtual syncer::ModelTypeSet GetPreferredDataTypes() const override; |
| 196 | 196 |
| 197 // ProfileSyncServiceObserver implementation: | 197 // ProfileSyncServiceObserver implementation: |
| 198 virtual void OnStateChanged() OVERRIDE; | 198 virtual void OnStateChanged() override; |
| 199 | 199 |
| 200 // chrome::BrowserListObserver implementation: | 200 // chrome::BrowserListObserver implementation: |
| 201 virtual void OnBrowserSetLastActive(Browser* browser) OVERRIDE; | 201 virtual void OnBrowserSetLastActive(Browser* browser) override; |
| 202 | 202 |
| 203 private: | 203 private: |
| 204 friend class SupervisedUserServiceExtensionTestBase; | 204 friend class SupervisedUserServiceExtensionTestBase; |
| 205 friend class SupervisedUserServiceFactory; | 205 friend class SupervisedUserServiceFactory; |
| 206 FRIEND_TEST_ALL_PREFIXES(SupervisedUserServiceTest, ClearOmitOnRegistration); | 206 FRIEND_TEST_ALL_PREFIXES(SupervisedUserServiceTest, ClearOmitOnRegistration); |
| 207 FRIEND_TEST_ALL_PREFIXES(SupervisedUserServiceTest, | 207 FRIEND_TEST_ALL_PREFIXES(SupervisedUserServiceTest, |
| 208 ChangesIncludedSessionOnChangedSettings); | 208 ChangesIncludedSessionOnChangedSettings); |
| 209 FRIEND_TEST_ALL_PREFIXES(SupervisedUserServiceTest, | 209 FRIEND_TEST_ALL_PREFIXES(SupervisedUserServiceTest, |
| 210 ChangesSyncSessionStateOnChangedSettings); | 210 ChangesSyncSessionStateOnChangedSettings); |
| 211 // A bridge from the UI thread to the SupervisedUserURLFilters, one of which | 211 // A bridge from the UI thread to the SupervisedUserURLFilters, one of which |
| (...skipping 150 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 362 | 362 |
| 363 // Used to create permission requests. | 363 // Used to create permission requests. |
| 364 ScopedVector<PermissionRequestCreator> permissions_creators_; | 364 ScopedVector<PermissionRequestCreator> permissions_creators_; |
| 365 | 365 |
| 366 ObserverList<SupervisedUserServiceObserver> observer_list_; | 366 ObserverList<SupervisedUserServiceObserver> observer_list_; |
| 367 | 367 |
| 368 base::WeakPtrFactory<SupervisedUserService> weak_ptr_factory_; | 368 base::WeakPtrFactory<SupervisedUserService> weak_ptr_factory_; |
| 369 }; | 369 }; |
| 370 | 370 |
| 371 #endif // CHROME_BROWSER_SUPERVISED_USER_SUPERVISED_USER_SERVICE_H_ | 371 #endif // CHROME_BROWSER_SUPERVISED_USER_SUPERVISED_USER_SERVICE_H_ |
| OLD | NEW |