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

Side by Side Diff: chrome/browser/supervised_user/supervised_user_service.h

Issue 2568953002: Revert of Supervised Users: Create ResourceThrottle only if filtering is enabled (Closed)
Patch Set: Created 4 years 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
OLDNEW
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
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);
254 void SetDefaultFilteringBehavior( 253 void SetDefaultFilteringBehavior(
255 SupervisedUserURLFilter::FilteringBehavior behavior); 254 SupervisedUserURLFilter::FilteringBehavior behavior);
256 void LoadWhitelists( 255 void LoadWhitelists(
257 const std::vector<scoped_refptr<SupervisedUserSiteList>>& site_lists); 256 const std::vector<scoped_refptr<SupervisedUserSiteList>>& site_lists);
258 // TODO(treib): Make SupervisedUserBlacklist refcounted, so the IO thread 257 // TODO(treib): Make SupervisedUserBlacklist refcounted, so the IO thread
259 // will retain a reference to the blacklist. 258 // will retain a reference to the blacklist.
260 void SetBlacklist(const SupervisedUserBlacklist* blacklist); 259 void SetBlacklist(const SupervisedUserBlacklist* blacklist);
261 bool HasBlacklist() const; 260 bool HasBlacklist() const;
262 void SetManualHosts(std::unique_ptr<std::map<std::string, bool>> host_map); 261 void SetManualHosts(std::unique_ptr<std::map<std::string, bool>> host_map);
263 void SetManualURLs(std::unique_ptr<std::map<GURL, bool>> url_map); 262 void SetManualURLs(std::unique_ptr<std::map<GURL, bool>> url_map);
(...skipping 208 matching lines...) Expand 10 before | Expand all | Expand 10 after
472 471
473 base::ObserverList<SupervisedUserServiceObserver> observer_list_; 472 base::ObserverList<SupervisedUserServiceObserver> observer_list_;
474 473
475 // Prevents Sync from running until configuration is complete. 474 // Prevents Sync from running until configuration is complete.
476 std::unique_ptr<syncer::SyncSetupInProgressHandle> sync_blocker_; 475 std::unique_ptr<syncer::SyncSetupInProgressHandle> sync_blocker_;
477 476
478 base::WeakPtrFactory<SupervisedUserService> weak_ptr_factory_; 477 base::WeakPtrFactory<SupervisedUserService> weak_ptr_factory_;
479 }; 478 };
480 479
481 #endif // CHROME_BROWSER_SUPERVISED_USER_SUPERVISED_USER_SERVICE_H_ 480 #endif // CHROME_BROWSER_SUPERVISED_USER_SUPERVISED_USER_SERVICE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698