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

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

Issue 1851803002: [NTP Popular Sites] Store country/version in prefs (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: review Created 4 years, 8 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>
11 #include <string> 11 #include <string>
12 #include <vector> 12 #include <vector>
13 13
14 #include "base/callback.h" 14 #include "base/callback.h"
15 #include "base/gtest_prod_util.h" 15 #include "base/gtest_prod_util.h"
16 #include "base/macros.h" 16 #include "base/macros.h"
17 #include "base/memory/scoped_ptr.h" 17 #include "base/memory/scoped_ptr.h"
18 #include "base/memory/scoped_vector.h" 18 #include "base/memory/scoped_vector.h"
19 #include "base/observer_list.h" 19 #include "base/observer_list.h"
20 #include "base/scoped_observer.h" 20 #include "base/scoped_observer.h"
21 #include "base/strings/string16.h" 21 #include "base/strings/string16.h"
22 #include "build/build_config.h" 22 #include "build/build_config.h"
23 #include "chrome/browser/net/file_downloader.h"
23 #include "chrome/browser/supervised_user/experimental/safe_search_url_reporter.h " 24 #include "chrome/browser/supervised_user/experimental/safe_search_url_reporter.h "
24 #include "chrome/browser/supervised_user/experimental/supervised_user_blacklist. h" 25 #include "chrome/browser/supervised_user/experimental/supervised_user_blacklist. h"
25 #include "chrome/browser/supervised_user/supervised_user_url_filter.h" 26 #include "chrome/browser/supervised_user/supervised_user_url_filter.h"
26 #include "chrome/browser/supervised_user/supervised_users.h" 27 #include "chrome/browser/supervised_user/supervised_users.h"
27 #include "chrome/browser/ui/browser_list_observer.h" 28 #include "chrome/browser/ui/browser_list_observer.h"
28 #include "components/keyed_service/core/keyed_service.h" 29 #include "components/keyed_service/core/keyed_service.h"
29 #include "components/prefs/pref_change_registrar.h" 30 #include "components/prefs/pref_change_registrar.h"
30 #include "components/sync_driver/sync_service_observer.h" 31 #include "components/sync_driver/sync_service_observer.h"
31 #include "components/sync_driver/sync_type_preference_provider.h" 32 #include "components/sync_driver/sync_type_preference_provider.h"
32 #include "net/url_request/url_request_context_getter.h" 33 #include "net/url_request/url_request_context_getter.h"
33 34
34 #if defined(ENABLE_EXTENSIONS) 35 #if defined(ENABLE_EXTENSIONS)
35 #include "extensions/browser/management_policy.h" 36 #include "extensions/browser/management_policy.h"
36 #endif 37 #endif
37 38
38 class Browser; 39 class Browser;
39 class FileDownloader;
40 class GoogleServiceAuthError; 40 class GoogleServiceAuthError;
41 class PermissionRequestCreator; 41 class PermissionRequestCreator;
42 class Profile; 42 class Profile;
43 class SupervisedUserRegistrationUtility; 43 class SupervisedUserRegistrationUtility;
44 class SupervisedUserServiceObserver; 44 class SupervisedUserServiceObserver;
45 class SupervisedUserSettingsService; 45 class SupervisedUserSettingsService;
46 class SupervisedUserSiteList; 46 class SupervisedUserSiteList;
47 class SupervisedUserURLFilter; 47 class SupervisedUserURLFilter;
48 class SupervisedUserWhitelistService; 48 class SupervisedUserWhitelistService;
49 49
(...skipping 279 matching lines...) Expand 10 before | Expand all | Expand 10 after
329 void LoadBlacklist(const base::FilePath& path, const GURL& url); 329 void LoadBlacklist(const base::FilePath& path, const GURL& url);
330 330
331 void OnBlacklistFileChecked(const base::FilePath& path, 331 void OnBlacklistFileChecked(const base::FilePath& path,
332 const GURL& url, 332 const GURL& url,
333 bool file_exists); 333 bool file_exists);
334 334
335 // Asynchronously loads a blacklist from a binary file at |path| and applies 335 // Asynchronously loads a blacklist from a binary file at |path| and applies
336 // it to the URL filters. 336 // it to the URL filters.
337 void LoadBlacklistFromFile(const base::FilePath& path); 337 void LoadBlacklistFromFile(const base::FilePath& path);
338 338
339 void OnBlacklistDownloadDone(const base::FilePath& path, bool success); 339 void OnBlacklistDownloadDone(const base::FilePath& path,
340 FileDownloader::Result result);
340 341
341 void OnBlacklistLoaded(); 342 void OnBlacklistLoaded();
342 343
343 void UpdateBlacklist(); 344 void UpdateBlacklist();
344 345
345 // Updates the manual overrides for hosts in the URL filters when the 346 // Updates the manual overrides for hosts in the URL filters when the
346 // corresponding preference is changed. 347 // corresponding preference is changed.
347 void UpdateManualHosts(); 348 void UpdateManualHosts();
348 349
349 // Updates the manual overrides for URLs in the URL filters when the 350 // Updates the manual overrides for URLs in the URL filters when the
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after
407 408
408 // Used to report inappropriate URLs to SafeSarch API. 409 // Used to report inappropriate URLs to SafeSarch API.
409 scoped_ptr<SafeSearchURLReporter> url_reporter_; 410 scoped_ptr<SafeSearchURLReporter> url_reporter_;
410 411
411 base::ObserverList<SupervisedUserServiceObserver> observer_list_; 412 base::ObserverList<SupervisedUserServiceObserver> observer_list_;
412 413
413 base::WeakPtrFactory<SupervisedUserService> weak_ptr_factory_; 414 base::WeakPtrFactory<SupervisedUserService> weak_ptr_factory_;
414 }; 415 };
415 416
416 #endif // CHROME_BROWSER_SUPERVISED_USER_SUPERVISED_USER_SERVICE_H_ 417 #endif // CHROME_BROWSER_SUPERVISED_USER_SUPERVISED_USER_SERVICE_H_
OLDNEW
« no previous file with comments | « chrome/browser/resources/popular_sites_internals.js ('k') | chrome/browser/supervised_user/supervised_user_service.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698