| 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 <stddef.h> | 8 #include <stddef.h> |
| 9 | 9 |
| 10 #include <map> | 10 #include <map> |
| (...skipping 232 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 243 // lives on the IO thread. This class mediates access to them and makes sure | 243 // lives on the IO thread. This class mediates access to them and makes sure |
| 244 // they are kept in sync. | 244 // they are kept in sync. |
| 245 class URLFilterContext { | 245 class URLFilterContext { |
| 246 public: | 246 public: |
| 247 URLFilterContext(); | 247 URLFilterContext(); |
| 248 ~URLFilterContext(); | 248 ~URLFilterContext(); |
| 249 | 249 |
| 250 SupervisedUserURLFilter* ui_url_filter() const; | 250 SupervisedUserURLFilter* ui_url_filter() const; |
| 251 SupervisedUserURLFilter* io_url_filter() const; | 251 SupervisedUserURLFilter* io_url_filter() const; |
| 252 | 252 |
| 253 void SetEnabled(bool enabled); |
| 253 void SetDefaultFilteringBehavior( | 254 void SetDefaultFilteringBehavior( |
| 254 SupervisedUserURLFilter::FilteringBehavior behavior); | 255 SupervisedUserURLFilter::FilteringBehavior behavior); |
| 255 void LoadWhitelists( | 256 void LoadWhitelists( |
| 256 const std::vector<scoped_refptr<SupervisedUserSiteList>>& site_lists); | 257 const std::vector<scoped_refptr<SupervisedUserSiteList>>& site_lists); |
| 257 // TODO(treib): Make SupervisedUserBlacklist refcounted, so the IO thread | 258 // TODO(treib): Make SupervisedUserBlacklist refcounted, so the IO thread |
| 258 // will retain a reference to the blacklist. | 259 // will retain a reference to the blacklist. |
| 259 void SetBlacklist(const SupervisedUserBlacklist* blacklist); | 260 void SetBlacklist(const SupervisedUserBlacklist* blacklist); |
| 260 bool HasBlacklist() const; | 261 bool HasBlacklist() const; |
| 261 void SetManualHosts(std::unique_ptr<std::map<std::string, bool>> host_map); | 262 void SetManualHosts(std::unique_ptr<std::map<std::string, bool>> host_map); |
| 262 void SetManualURLs(std::unique_ptr<std::map<GURL, bool>> url_map); | 263 void SetManualURLs(std::unique_ptr<std::map<GURL, bool>> url_map); |
| (...skipping 208 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 471 | 472 |
| 472 base::ObserverList<SupervisedUserServiceObserver> observer_list_; | 473 base::ObserverList<SupervisedUserServiceObserver> observer_list_; |
| 473 | 474 |
| 474 // Prevents Sync from running until configuration is complete. | 475 // Prevents Sync from running until configuration is complete. |
| 475 std::unique_ptr<syncer::SyncSetupInProgressHandle> sync_blocker_; | 476 std::unique_ptr<syncer::SyncSetupInProgressHandle> sync_blocker_; |
| 476 | 477 |
| 477 base::WeakPtrFactory<SupervisedUserService> weak_ptr_factory_; | 478 base::WeakPtrFactory<SupervisedUserService> weak_ptr_factory_; |
| 478 }; | 479 }; |
| 479 | 480 |
| 480 #endif // CHROME_BROWSER_SUPERVISED_USER_SUPERVISED_USER_SERVICE_H_ | 481 #endif // CHROME_BROWSER_SUPERVISED_USER_SUPERVISED_USER_SERVICE_H_ |
| OLD | NEW |