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

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

Issue 2479593006: Move enable extensions define to a build flag. (Closed)
Patch Set: Merge Created 4 years, 1 month 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 12 matching lines...) Expand all
23 #include "chrome/browser/net/file_downloader.h" 23 #include "chrome/browser/net/file_downloader.h"
24 #include "chrome/browser/supervised_user/experimental/safe_search_url_reporter.h " 24 #include "chrome/browser/supervised_user/experimental/safe_search_url_reporter.h "
25 #include "chrome/browser/supervised_user/experimental/supervised_user_blacklist. h" 25 #include "chrome/browser/supervised_user/experimental/supervised_user_blacklist. h"
26 #include "chrome/browser/supervised_user/supervised_user_url_filter.h" 26 #include "chrome/browser/supervised_user/supervised_user_url_filter.h"
27 #include "chrome/browser/supervised_user/supervised_users.h" 27 #include "chrome/browser/supervised_user/supervised_users.h"
28 #include "chrome/browser/ui/browser_list_observer.h" 28 #include "chrome/browser/ui/browser_list_observer.h"
29 #include "components/keyed_service/core/keyed_service.h" 29 #include "components/keyed_service/core/keyed_service.h"
30 #include "components/prefs/pref_change_registrar.h" 30 #include "components/prefs/pref_change_registrar.h"
31 #include "components/sync/driver/sync_service_observer.h" 31 #include "components/sync/driver/sync_service_observer.h"
32 #include "components/sync/driver/sync_type_preference_provider.h" 32 #include "components/sync/driver/sync_type_preference_provider.h"
33 #include "extensions/features/features.h"
33 #include "net/url_request/url_request_context_getter.h" 34 #include "net/url_request/url_request_context_getter.h"
34 35
35 #if defined(ENABLE_EXTENSIONS) 36 #if BUILDFLAG(ENABLE_EXTENSIONS)
36 #include "extensions/browser/extension_registry_observer.h" 37 #include "extensions/browser/extension_registry_observer.h"
37 #include "extensions/browser/management_policy.h" 38 #include "extensions/browser/management_policy.h"
38 #endif 39 #endif
39 40
40 class Browser; 41 class Browser;
41 class GoogleServiceAuthError; 42 class GoogleServiceAuthError;
42 class PermissionRequestCreator; 43 class PermissionRequestCreator;
43 class Profile; 44 class Profile;
44 class SupervisedUserRegistrationUtility; 45 class SupervisedUserRegistrationUtility;
45 class SupervisedUserServiceObserver; 46 class SupervisedUserServiceObserver;
(...skipping 20 matching lines...) Expand all
66 } 67 }
67 68
68 namespace user_prefs { 69 namespace user_prefs {
69 class PrefRegistrySyncable; 70 class PrefRegistrySyncable;
70 } 71 }
71 72
72 // This class handles all the information related to a given supervised profile 73 // This class handles all the information related to a given supervised profile
73 // (e.g. the installed content packs, the default URL filtering behavior, or 74 // (e.g. the installed content packs, the default URL filtering behavior, or
74 // manual whitelist/blacklist overrides). 75 // manual whitelist/blacklist overrides).
75 class SupervisedUserService : public KeyedService, 76 class SupervisedUserService : public KeyedService,
76 #if defined(ENABLE_EXTENSIONS) 77 #if BUILDFLAG(ENABLE_EXTENSIONS)
77 public extensions::ExtensionRegistryObserver, 78 public extensions::ExtensionRegistryObserver,
78 public extensions::ManagementPolicy::Provider, 79 public extensions::ManagementPolicy::Provider,
79 #endif 80 #endif
80 public syncer::SyncTypePreferenceProvider, 81 public syncer::SyncTypePreferenceProvider,
81 #if !defined(OS_ANDROID) 82 #if !defined(OS_ANDROID)
82 public syncer::SyncServiceObserver, 83 public syncer::SyncServiceObserver,
83 public chrome::BrowserListObserver, 84 public chrome::BrowserListObserver,
84 #endif 85 #endif
85 public SupervisedUserURLFilter::Observer { 86 public SupervisedUserURLFilter::Observer {
86 public: 87 public:
(...skipping 212 matching lines...) Expand 10 before | Expand all | Expand 10 after
299 void SetupSync(); 300 void SetupSync();
300 void StartSetupSync(); 301 void StartSetupSync();
301 void FinishSetupSyncWhenReady(); 302 void FinishSetupSyncWhenReady();
302 void FinishSetupSync(); 303 void FinishSetupSync();
303 #endif 304 #endif
304 305
305 bool ProfileIsSupervised() const; 306 bool ProfileIsSupervised() const;
306 307
307 void OnCustodianInfoChanged(); 308 void OnCustodianInfoChanged();
308 309
309 #if defined(ENABLE_EXTENSIONS) 310 #if BUILDFLAG(ENABLE_EXTENSIONS)
310 // extensions::ManagementPolicy::Provider implementation: 311 // extensions::ManagementPolicy::Provider implementation:
311 std::string GetDebugPolicyProviderName() const override; 312 std::string GetDebugPolicyProviderName() const override;
312 bool UserMayLoad(const extensions::Extension* extension, 313 bool UserMayLoad(const extensions::Extension* extension,
313 base::string16* error) const override; 314 base::string16* error) const override;
314 bool UserMayModifySettings(const extensions::Extension* extension, 315 bool UserMayModifySettings(const extensions::Extension* extension,
315 base::string16* error) const override; 316 base::string16* error) const override;
316 bool MustRemainInstalled(const extensions::Extension* extension, 317 bool MustRemainInstalled(const extensions::Extension* extension,
317 base::string16* error) const override; 318 base::string16* error) const override;
318 bool MustRemainDisabled(const extensions::Extension* extension, 319 bool MustRemainDisabled(const extensions::Extension* extension,
319 extensions::Extension::DisableReason* reason, 320 extensions::Extension::DisableReason* reason,
(...skipping 135 matching lines...) Expand 10 before | Expand all | Expand 10 after
455 std::unique_ptr<SupervisedUserWhitelistService> whitelist_service_; 456 std::unique_ptr<SupervisedUserWhitelistService> whitelist_service_;
456 457
457 std::vector<scoped_refptr<SupervisedUserSiteList>> whitelists_; 458 std::vector<scoped_refptr<SupervisedUserSiteList>> whitelists_;
458 459
459 // Used to create permission requests. 460 // Used to create permission requests.
460 ScopedVector<PermissionRequestCreator> permissions_creators_; 461 ScopedVector<PermissionRequestCreator> permissions_creators_;
461 462
462 // Used to report inappropriate URLs to SafeSarch API. 463 // Used to report inappropriate URLs to SafeSarch API.
463 std::unique_ptr<SafeSearchURLReporter> url_reporter_; 464 std::unique_ptr<SafeSearchURLReporter> url_reporter_;
464 465
465 #if defined(ENABLE_EXTENSIONS) 466 #if BUILDFLAG(ENABLE_EXTENSIONS)
466 ScopedObserver<extensions::ExtensionRegistry, 467 ScopedObserver<extensions::ExtensionRegistry,
467 extensions::ExtensionRegistryObserver> 468 extensions::ExtensionRegistryObserver>
468 registry_observer_; 469 registry_observer_;
469 #endif 470 #endif
470 471
471 base::ObserverList<SupervisedUserServiceObserver> observer_list_; 472 base::ObserverList<SupervisedUserServiceObserver> observer_list_;
472 473
473 // Prevents Sync from running until configuration is complete. 474 // Prevents Sync from running until configuration is complete.
474 std::unique_ptr<syncer::SyncSetupInProgressHandle> sync_blocker_; 475 std::unique_ptr<syncer::SyncSetupInProgressHandle> sync_blocker_;
475 476
476 base::WeakPtrFactory<SupervisedUserService> weak_ptr_factory_; 477 base::WeakPtrFactory<SupervisedUserService> weak_ptr_factory_;
477 }; 478 };
478 479
479 #endif // CHROME_BROWSER_SUPERVISED_USER_SUPERVISED_USER_SERVICE_H_ 480 #endif // CHROME_BROWSER_SUPERVISED_USER_SUPERVISED_USER_SERVICE_H_
OLDNEW
« no previous file with comments | « chrome/browser/ssl/ssl_blocking_page.h ('k') | chrome/browser/supervised_user/supervised_user_service.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698