| 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 <stddef.h> | 8 #include <stddef.h> |
| 9 | 9 |
| 10 #include <map> | 10 #include <map> |
| (...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 54 } | 54 } |
| 55 | 55 |
| 56 namespace content { | 56 namespace content { |
| 57 class WebContents; | 57 class WebContents; |
| 58 } | 58 } |
| 59 | 59 |
| 60 namespace extensions { | 60 namespace extensions { |
| 61 class ExtensionRegistry; | 61 class ExtensionRegistry; |
| 62 } | 62 } |
| 63 | 63 |
| 64 namespace sync_driver { | 64 namespace syncer { |
| 65 class SyncSetupInProgressHandle; | 65 class SyncSetupInProgressHandle; |
| 66 } | 66 } |
| 67 | 67 |
| 68 namespace user_prefs { | 68 namespace user_prefs { |
| 69 class PrefRegistrySyncable; | 69 class PrefRegistrySyncable; |
| 70 } | 70 } |
| 71 | 71 |
| 72 // This class handles all the information related to a given supervised profile | 72 // 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 | 73 // (e.g. the installed content packs, the default URL filtering behavior, or |
| 74 // manual whitelist/blacklist overrides). | 74 // manual whitelist/blacklist overrides). |
| 75 class SupervisedUserService : public KeyedService, | 75 class SupervisedUserService : public KeyedService, |
| 76 #if defined(ENABLE_EXTENSIONS) | 76 #if defined(ENABLE_EXTENSIONS) |
| 77 public extensions::ExtensionRegistryObserver, | 77 public extensions::ExtensionRegistryObserver, |
| 78 public extensions::ManagementPolicy::Provider, | 78 public extensions::ManagementPolicy::Provider, |
| 79 #endif | 79 #endif |
| 80 public SyncTypePreferenceProvider, | 80 public syncer::SyncTypePreferenceProvider, |
| 81 #if !defined(OS_ANDROID) | 81 #if !defined(OS_ANDROID) |
| 82 public sync_driver::SyncServiceObserver, | 82 public syncer::SyncServiceObserver, |
| 83 public chrome::BrowserListObserver, | 83 public chrome::BrowserListObserver, |
| 84 #endif | 84 #endif |
| 85 public SupervisedUserURLFilter::Observer { | 85 public SupervisedUserURLFilter::Observer { |
| 86 public: | 86 public: |
| 87 using NavigationBlockedCallback = base::Callback<void(content::WebContents*)>; | 87 using NavigationBlockedCallback = base::Callback<void(content::WebContents*)>; |
| 88 using AuthErrorCallback = base::Callback<void(const GoogleServiceAuthError&)>; | 88 using AuthErrorCallback = base::Callback<void(const GoogleServiceAuthError&)>; |
| 89 using SuccessCallback = base::Callback<void(bool)>; | 89 using SuccessCallback = base::Callback<void(bool)>; |
| 90 | 90 |
| 91 class Delegate { | 91 class Delegate { |
| 92 public: | 92 public: |
| (...skipping 113 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 206 // Public for testing. | 206 // Public for testing. |
| 207 bool IncludesSyncSessionsType() const; | 207 bool IncludesSyncSessionsType() const; |
| 208 | 208 |
| 209 // ProfileKeyedService override: | 209 // ProfileKeyedService override: |
| 210 void Shutdown() override; | 210 void Shutdown() override; |
| 211 | 211 |
| 212 // SyncTypePreferenceProvider implementation: | 212 // SyncTypePreferenceProvider implementation: |
| 213 syncer::ModelTypeSet GetPreferredDataTypes() const override; | 213 syncer::ModelTypeSet GetPreferredDataTypes() const override; |
| 214 | 214 |
| 215 #if !defined(OS_ANDROID) | 215 #if !defined(OS_ANDROID) |
| 216 // sync_driver::SyncServiceObserver implementation: | 216 // syncer::SyncServiceObserver implementation: |
| 217 void OnStateChanged() override; | 217 void OnStateChanged() override; |
| 218 | 218 |
| 219 // chrome::BrowserListObserver implementation: | 219 // chrome::BrowserListObserver implementation: |
| 220 void OnBrowserSetLastActive(Browser* browser) override; | 220 void OnBrowserSetLastActive(Browser* browser) override; |
| 221 #endif // !defined(OS_ANDROID) | 221 #endif // !defined(OS_ANDROID) |
| 222 | 222 |
| 223 // SupervisedUserURLFilter::Observer implementation: | 223 // SupervisedUserURLFilter::Observer implementation: |
| 224 void OnSiteListUpdated() override; | 224 void OnSiteListUpdated() override; |
| 225 | 225 |
| 226 private: | 226 private: |
| (...skipping 237 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 464 | 464 |
| 465 #if defined(ENABLE_EXTENSIONS) | 465 #if defined(ENABLE_EXTENSIONS) |
| 466 ScopedObserver<extensions::ExtensionRegistry, | 466 ScopedObserver<extensions::ExtensionRegistry, |
| 467 extensions::ExtensionRegistryObserver> | 467 extensions::ExtensionRegistryObserver> |
| 468 registry_observer_; | 468 registry_observer_; |
| 469 #endif | 469 #endif |
| 470 | 470 |
| 471 base::ObserverList<SupervisedUserServiceObserver> observer_list_; | 471 base::ObserverList<SupervisedUserServiceObserver> observer_list_; |
| 472 | 472 |
| 473 // Prevents Sync from running until configuration is complete. | 473 // Prevents Sync from running until configuration is complete. |
| 474 std::unique_ptr<sync_driver::SyncSetupInProgressHandle> sync_blocker_; | 474 std::unique_ptr<syncer::SyncSetupInProgressHandle> sync_blocker_; |
| 475 | 475 |
| 476 base::WeakPtrFactory<SupervisedUserService> weak_ptr_factory_; | 476 base::WeakPtrFactory<SupervisedUserService> weak_ptr_factory_; |
| 477 }; | 477 }; |
| 478 | 478 |
| 479 #endif // CHROME_BROWSER_SUPERVISED_USER_SUPERVISED_USER_SERVICE_H_ | 479 #endif // CHROME_BROWSER_SUPERVISED_USER_SUPERVISED_USER_SERVICE_H_ |
| OLD | NEW |