| 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 <string> | 9 #include <string> |
| 10 #include <vector> | 10 #include <vector> |
| (...skipping 263 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 274 size_t index, | 274 size_t index, |
| 275 bool success); | 275 bool success); |
| 276 | 276 |
| 277 void OnSupervisedUserIdChanged(); | 277 void OnSupervisedUserIdChanged(); |
| 278 | 278 |
| 279 void OnDefaultFilteringBehaviorChanged(); | 279 void OnDefaultFilteringBehaviorChanged(); |
| 280 | 280 |
| 281 void OnSiteListsChanged( | 281 void OnSiteListsChanged( |
| 282 const std::vector<scoped_refptr<SupervisedUserSiteList>>& site_lists); | 282 const std::vector<scoped_refptr<SupervisedUserSiteList>>& site_lists); |
| 283 | 283 |
| 284 // Asynchronously downloads a static blacklist file from |url|, stores it at | 284 // Asynchronously loads a blacklist from a binary file at |path| and applies |
| 285 // |path|, loads it, and applies it to the URL filters. If |url| is not valid | 285 // it to the URL filters. If no file exists at |path| yet, downloads a file |
| 286 // (e.g. empty), directly tries to load from |path|. | 286 // from |url| and stores it at |path| first. |
| 287 void LoadBlacklist(const base::FilePath& path, const GURL& url); | 287 void LoadBlacklist(const base::FilePath& path, const GURL& url); |
| 288 | 288 |
| 289 // Asynchronously loads a static blacklist from a binary file at |path| and | 289 void OnBlacklistFileChecked(const base::FilePath& path, |
| 290 // applies it to the URL filters. | 290 const GURL& url, |
| 291 bool file_exists); |
| 292 |
| 293 // Asynchronously loads a blacklist from a binary file at |path| and applies |
| 294 // it to the URL filters. |
| 291 void LoadBlacklistFromFile(const base::FilePath& path); | 295 void LoadBlacklistFromFile(const base::FilePath& path); |
| 292 | 296 |
| 293 void OnBlacklistDownloadDone(const base::FilePath& path, bool success); | 297 void OnBlacklistDownloadDone(const base::FilePath& path, bool success); |
| 294 | 298 |
| 295 void OnBlacklistLoaded(); | 299 void OnBlacklistLoaded(); |
| 296 | 300 |
| 297 // Updates the manual overrides for hosts in the URL filters when the | 301 // Updates the manual overrides for hosts in the URL filters when the |
| 298 // corresponding preference is changed. | 302 // corresponding preference is changed. |
| 299 void UpdateManualHosts(); | 303 void UpdateManualHosts(); |
| 300 | 304 |
| (...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 346 | 350 |
| 347 // Used to create permission requests. | 351 // Used to create permission requests. |
| 348 ScopedVector<PermissionRequestCreator> permissions_creators_; | 352 ScopedVector<PermissionRequestCreator> permissions_creators_; |
| 349 | 353 |
| 350 ObserverList<SupervisedUserServiceObserver> observer_list_; | 354 ObserverList<SupervisedUserServiceObserver> observer_list_; |
| 351 | 355 |
| 352 base::WeakPtrFactory<SupervisedUserService> weak_ptr_factory_; | 356 base::WeakPtrFactory<SupervisedUserService> weak_ptr_factory_; |
| 353 }; | 357 }; |
| 354 | 358 |
| 355 #endif // CHROME_BROWSER_SUPERVISED_USER_SUPERVISED_USER_SERVICE_H_ | 359 #endif // CHROME_BROWSER_SUPERVISED_USER_SUPERVISED_USER_SERVICE_H_ |
| OLD | NEW |