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

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

Issue 2578533002: Reland of Supervised Users: Create ResourceThrottle only if filtering is enabled (Closed)
Patch Set: rebase Created 3 years, 11 months 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);
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
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_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698