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

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

Issue 1086393002: Supervised user blacklist: Don't download the blacklist file on every startup (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 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 <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
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
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_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698