Chromium Code Reviews| 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 #include "chrome/browser/supervised_user/supervised_user_service.h" | 5 #include "chrome/browser/supervised_user/supervised_user_service.h" |
| 6 | 6 |
| 7 #include <utility> | 7 #include <utility> |
| 8 | 8 |
| 9 #include "base/command_line.h" | 9 #include "base/command_line.h" |
| 10 #include "base/feature_list.h" | |
| 10 #include "base/files/file_path.h" | 11 #include "base/files/file_path.h" |
| 11 #include "base/files/file_util.h" | 12 #include "base/files/file_util.h" |
| 12 #include "base/memory/ref_counted.h" | 13 #include "base/memory/ref_counted.h" |
| 13 #include "base/path_service.h" | 14 #include "base/path_service.h" |
| 14 #include "base/strings/stringprintf.h" | 15 #include "base/strings/stringprintf.h" |
| 15 #include "base/strings/utf_string_conversions.h" | 16 #include "base/strings/utf_string_conversions.h" |
| 16 #include "base/task_runner_util.h" | 17 #include "base/task_runner_util.h" |
| 17 #include "base/version.h" | 18 #include "base/version.h" |
| 18 #include "build/build_config.h" | 19 #include "build/build_config.h" |
| 19 #include "chrome/browser/browser_process.h" | 20 #include "chrome/browser/browser_process.h" |
| 20 #include "chrome/browser/component_updater/supervised_user_whitelist_installer.h " | 21 #include "chrome/browser/component_updater/supervised_user_whitelist_installer.h " |
| 21 #include "chrome/browser/profiles/profile.h" | 22 #include "chrome/browser/profiles/profile.h" |
| 22 #include "chrome/browser/profiles/profile_attributes_entry.h" | 23 #include "chrome/browser/profiles/profile_attributes_entry.h" |
| 23 #include "chrome/browser/profiles/profile_attributes_storage.h" | 24 #include "chrome/browser/profiles/profile_attributes_storage.h" |
| 24 #include "chrome/browser/profiles/profile_manager.h" | 25 #include "chrome/browser/profiles/profile_manager.h" |
| 25 #include "chrome/browser/signin/profile_oauth2_token_service_factory.h" | 26 #include "chrome/browser/signin/profile_oauth2_token_service_factory.h" |
| 26 #include "chrome/browser/signin/signin_manager_factory.h" | 27 #include "chrome/browser/signin/signin_manager_factory.h" |
| 27 #include "chrome/browser/supervised_user/experimental/supervised_user_filtering_ switches.h" | 28 #include "chrome/browser/supervised_user/experimental/supervised_user_filtering_ switches.h" |
| 28 #include "chrome/browser/supervised_user/permission_request_creator.h" | 29 #include "chrome/browser/supervised_user/permission_request_creator.h" |
| 29 #include "chrome/browser/supervised_user/supervised_user_constants.h" | 30 #include "chrome/browser/supervised_user/supervised_user_constants.h" |
| 31 #include "chrome/browser/supervised_user/supervised_user_features.h" | |
| 30 #include "chrome/browser/supervised_user/supervised_user_service_observer.h" | 32 #include "chrome/browser/supervised_user/supervised_user_service_observer.h" |
| 31 #include "chrome/browser/supervised_user/supervised_user_settings_service.h" | 33 #include "chrome/browser/supervised_user/supervised_user_settings_service.h" |
| 32 #include "chrome/browser/supervised_user/supervised_user_settings_service_factor y.h" | 34 #include "chrome/browser/supervised_user/supervised_user_settings_service_factor y.h" |
| 33 #include "chrome/browser/supervised_user/supervised_user_site_list.h" | 35 #include "chrome/browser/supervised_user/supervised_user_site_list.h" |
| 34 #include "chrome/browser/supervised_user/supervised_user_whitelist_service.h" | 36 #include "chrome/browser/supervised_user/supervised_user_whitelist_service.h" |
| 35 #include "chrome/browser/sync/profile_sync_service_factory.h" | 37 #include "chrome/browser/sync/profile_sync_service_factory.h" |
| 36 #include "chrome/browser/ui/browser.h" | 38 #include "chrome/browser/ui/browser.h" |
| 37 #include "chrome/browser/ui/browser_list.h" | 39 #include "chrome/browser/ui/browser_list.h" |
| 38 #include "chrome/common/chrome_paths.h" | 40 #include "chrome/common/chrome_paths.h" |
| 39 #include "chrome/common/chrome_switches.h" | 41 #include "chrome/common/chrome_switches.h" |
| 40 #include "chrome/common/pref_names.h" | 42 #include "chrome/common/pref_names.h" |
| 41 #include "chrome/grit/generated_resources.h" | 43 #include "chrome/grit/generated_resources.h" |
| 42 #include "components/browser_sync/browser/profile_sync_service.h" | 44 #include "components/browser_sync/browser/profile_sync_service.h" |
| 43 #include "components/pref_registry/pref_registry_syncable.h" | 45 #include "components/pref_registry/pref_registry_syncable.h" |
| 44 #include "components/prefs/pref_service.h" | 46 #include "components/prefs/pref_service.h" |
| 45 #include "components/signin/core/browser/profile_oauth2_token_service.h" | 47 #include "components/signin/core/browser/profile_oauth2_token_service.h" |
| 46 #include "components/signin/core/browser/signin_manager.h" | 48 #include "components/signin/core/browser/signin_manager.h" |
| 47 #include "components/signin/core/browser/signin_manager_base.h" | 49 #include "components/signin/core/browser/signin_manager_base.h" |
| 48 #include "components/signin/core/common/signin_switches.h" | 50 #include "components/signin/core/common/signin_switches.h" |
| 49 #include "content/public/browser/browser_thread.h" | 51 #include "content/public/browser/browser_thread.h" |
| 50 #include "content/public/browser/user_metrics.h" | 52 #include "content/public/browser/user_metrics.h" |
| 53 #include "extensions/browser/extension_registry.h" | |
| 51 #include "ui/base/l10n/l10n_util.h" | 54 #include "ui/base/l10n/l10n_util.h" |
| 52 | 55 |
| 53 #if !defined(OS_ANDROID) | 56 #if !defined(OS_ANDROID) |
| 54 #include "chrome/browser/supervised_user/legacy/custodian_profile_downloader_ser vice.h" | 57 #include "chrome/browser/supervised_user/legacy/custodian_profile_downloader_ser vice.h" |
| 55 #include "chrome/browser/supervised_user/legacy/custodian_profile_downloader_ser vice_factory.h" | 58 #include "chrome/browser/supervised_user/legacy/custodian_profile_downloader_ser vice_factory.h" |
| 56 #include "chrome/browser/supervised_user/legacy/permission_request_creator_sync. h" | 59 #include "chrome/browser/supervised_user/legacy/permission_request_creator_sync. h" |
| 57 #include "chrome/browser/supervised_user/legacy/supervised_user_pref_mapping_ser vice.h" | 60 #include "chrome/browser/supervised_user/legacy/supervised_user_pref_mapping_ser vice.h" |
| 58 #include "chrome/browser/supervised_user/legacy/supervised_user_pref_mapping_ser vice_factory.h" | 61 #include "chrome/browser/supervised_user/legacy/supervised_user_pref_mapping_ser vice_factory.h" |
| 59 #include "chrome/browser/supervised_user/legacy/supervised_user_registration_uti lity.h" | 62 #include "chrome/browser/supervised_user/legacy/supervised_user_registration_uti lity.h" |
| 60 #include "chrome/browser/supervised_user/legacy/supervised_user_shared_settings_ service_factory.h" | 63 #include "chrome/browser/supervised_user/legacy/supervised_user_shared_settings_ service_factory.h" |
| 61 #endif | 64 #endif |
| 62 | 65 |
| 63 #if defined(OS_CHROMEOS) | 66 #if defined(OS_CHROMEOS) |
| 64 #include "chrome/browser/chromeos/login/users/chrome_user_manager.h" | 67 #include "chrome/browser/chromeos/login/users/chrome_user_manager.h" |
| 65 #include "chrome/browser/chromeos/login/users/supervised_user_manager.h" | 68 #include "chrome/browser/chromeos/login/users/supervised_user_manager.h" |
| 66 #include "components/user_manager/user_manager.h" | 69 #include "components/user_manager/user_manager.h" |
| 67 #endif | 70 #endif |
| 68 | 71 |
| 69 #if defined(ENABLE_EXTENSIONS) | 72 #if defined(ENABLE_EXTENSIONS) |
| 70 #include "chrome/browser/extensions/extension_service.h" | 73 #include "chrome/browser/extensions/extension_service.h" |
| 74 #include "chrome/browser/extensions/extension_util.h" | |
| 75 #include "chrome/browser/supervised_user/supervised_user_service_factory.h" | |
| 76 #include "extensions/browser/extension_prefs.h" | |
| 71 #include "extensions/browser/extension_system.h" | 77 #include "extensions/browser/extension_system.h" |
| 72 #endif | 78 #endif |
| 73 | 79 |
| 74 #if defined(ENABLE_THEMES) | 80 #if defined(ENABLE_THEMES) |
| 75 #include "chrome/browser/themes/theme_service.h" | 81 #include "chrome/browser/themes/theme_service.h" |
| 76 #include "chrome/browser/themes/theme_service_factory.h" | 82 #include "chrome/browser/themes/theme_service_factory.h" |
| 77 #endif | 83 #endif |
| 78 | 84 |
| 79 using base::DictionaryValue; | 85 using base::DictionaryValue; |
| 80 using base::UserMetricsAction; | 86 using base::UserMetricsAction; |
| 81 using content::BrowserThread; | 87 using content::BrowserThread; |
| 88 using extensions::Extension; | |
| 89 using extensions::ExtensionPrefs; | |
| 90 using extensions::ExtensionSystem; | |
| 82 | 91 |
| 83 namespace { | 92 namespace { |
| 84 | 93 |
| 85 // The URL from which to download a host blacklist if no local one exists yet. | 94 // The URL from which to download a host blacklist if no local one exists yet. |
| 86 const char kBlacklistURL[] = | 95 const char kBlacklistURL[] = |
| 87 "https://www.gstatic.com/chrome/supervised_user/blacklist-20141001-1k.bin"; | 96 "https://www.gstatic.com/chrome/supervised_user/blacklist-20141001-1k.bin"; |
| 88 // The filename under which we'll store the blacklist (in the user data dir). | 97 // The filename under which we'll store the blacklist (in the user data dir). |
| 89 const char kBlacklistFilename[] = "su-blacklist.bin"; | 98 const char kBlacklistFilename[] = "su-blacklist.bin"; |
| 90 | 99 |
| 91 const char* const kCustodianInfoPrefs[] = { | 100 const char* const kCustodianInfoPrefs[] = { |
| 92 prefs::kSupervisedUserCustodianName, | 101 prefs::kSupervisedUserCustodianName, |
| 93 prefs::kSupervisedUserCustodianEmail, | 102 prefs::kSupervisedUserCustodianEmail, |
| 94 prefs::kSupervisedUserCustodianProfileImageURL, | 103 prefs::kSupervisedUserCustodianProfileImageURL, |
| 95 prefs::kSupervisedUserCustodianProfileURL, | 104 prefs::kSupervisedUserCustodianProfileURL, |
| 96 prefs::kSupervisedUserSecondCustodianName, | 105 prefs::kSupervisedUserSecondCustodianName, |
| 97 prefs::kSupervisedUserSecondCustodianEmail, | 106 prefs::kSupervisedUserSecondCustodianEmail, |
| 98 prefs::kSupervisedUserSecondCustodianProfileImageURL, | 107 prefs::kSupervisedUserSecondCustodianProfileImageURL, |
| 99 prefs::kSupervisedUserSecondCustodianProfileURL, | 108 prefs::kSupervisedUserSecondCustodianProfileURL, |
| 100 }; | 109 }; |
| 101 | 110 |
| 102 void CreateURLAccessRequest( | 111 void CreateURLAccessRequest( |
| 103 const GURL& url, | 112 const GURL& url, |
| 104 PermissionRequestCreator* creator, | 113 PermissionRequestCreator* creator, |
| 105 const SupervisedUserService::SuccessCallback& callback) { | 114 const SupervisedUserService::SuccessCallback& callback) { |
| 106 creator->CreateURLAccessRequest(url, callback); | 115 creator->CreateURLAccessRequest(url, callback); |
| 107 } | 116 } |
| 108 | 117 |
| 118 void CreateExtensionInstallRequest( | |
| 119 const std::string& id, | |
| 120 PermissionRequestCreator* creator, | |
| 121 const SupervisedUserService::SuccessCallback& callback) { | |
| 122 creator->CreateExtensionInstallRequest(id, callback); | |
| 123 } | |
| 124 | |
| 109 void CreateExtensionUpdateRequest( | 125 void CreateExtensionUpdateRequest( |
| 110 const std::string& id, | 126 const std::string& id, |
| 111 PermissionRequestCreator* creator, | 127 PermissionRequestCreator* creator, |
| 112 const SupervisedUserService::SuccessCallback& callback) { | 128 const SupervisedUserService::SuccessCallback& callback) { |
| 113 creator->CreateExtensionUpdateRequest(id, callback); | 129 creator->CreateExtensionUpdateRequest(id, callback); |
| 114 } | 130 } |
| 115 | 131 |
| 132 // Default callback for AddExtensionInstallRequest. | |
| 133 void ExtensionInstallRequestSent(const std::string& id, bool success) { | |
| 134 VLOG_IF(1, !success) << "Failed sending install request for " << id; | |
| 135 } | |
| 136 | |
| 116 // Default callback for AddExtensionUpdateRequest. | 137 // Default callback for AddExtensionUpdateRequest. |
| 117 void ExtensionUpdateRequestSent(const std::string& id, bool success) { | 138 void ExtensionUpdateRequestSent(const std::string& id, bool success) { |
| 118 VLOG_IF(1, !success) << "Failed sending update request for " << id; | 139 VLOG_IF(1, !success) << "Failed sending update request for " << id; |
| 119 } | 140 } |
| 120 | 141 |
| 121 base::FilePath GetBlacklistPath() { | 142 base::FilePath GetBlacklistPath() { |
| 122 base::FilePath blacklist_dir; | 143 base::FilePath blacklist_dir; |
| 123 PathService::Get(chrome::DIR_USER_DATA, &blacklist_dir); | 144 PathService::Get(chrome::DIR_USER_DATA, &blacklist_dir); |
| 124 return blacklist_dir.AppendASCII(kBlacklistFilename); | 145 return blacklist_dir.AppendASCII(kBlacklistFilename); |
| 125 } | 146 } |
| 126 | |
| 127 #if defined(ENABLE_EXTENSIONS) | |
| 128 enum ExtensionState { | |
| 129 EXTENSION_FORCED, | |
| 130 EXTENSION_BLOCKED, | |
| 131 EXTENSION_ALLOWED | |
| 132 }; | |
| 133 | |
| 134 ExtensionState GetExtensionState(const extensions::Extension* extension) { | |
| 135 bool was_installed_by_default = extension->was_installed_by_default(); | |
| 136 #if defined(OS_CHROMEOS) | |
| 137 // On Chrome OS all external sources are controlled by us so it means that | |
| 138 // they are "default". Method was_installed_by_default returns false because | |
| 139 // extensions creation flags are ignored in case of default extensions with | |
| 140 // update URL(the flags aren't passed to OnExternalExtensionUpdateUrlFound). | |
| 141 // TODO(dpolukhin): remove this Chrome OS specific code as soon as creation | |
| 142 // flags are not ignored. | |
| 143 was_installed_by_default = | |
| 144 extensions::Manifest::IsExternalLocation(extension->location()); | |
| 145 #endif | |
| 146 // Note: Component extensions are protected from modification/uninstallation | |
| 147 // anyway, so there's no need to enforce them again for supervised users. | |
| 148 // Also, leave policy-installed extensions alone - they have their own | |
| 149 // management; in particular we don't want to override the force-install list. | |
| 150 if (extensions::Manifest::IsComponentLocation(extension->location()) || | |
| 151 extensions::Manifest::IsPolicyLocation(extension->location()) || | |
| 152 extension->is_theme() || | |
| 153 extension->from_bookmark() || | |
| 154 extension->is_shared_module() || | |
| 155 was_installed_by_default) { | |
| 156 return EXTENSION_ALLOWED; | |
| 157 } | |
| 158 | |
| 159 if (extension->was_installed_by_custodian()) | |
| 160 return EXTENSION_FORCED; | |
| 161 | |
| 162 return EXTENSION_BLOCKED; | |
| 163 } | |
| 164 #endif | |
| 165 | |
| 166 } // namespace | 147 } // namespace |
| 167 | 148 |
| 168 SupervisedUserService::~SupervisedUserService() { | 149 SupervisedUserService::~SupervisedUserService() { |
| 169 DCHECK(!did_init_ || did_shutdown_); | 150 DCHECK(!did_init_ || did_shutdown_); |
| 170 url_filter_context_.ui_url_filter()->RemoveObserver(this); | 151 url_filter_context_.ui_url_filter()->RemoveObserver(this); |
| 171 } | 152 } |
| 172 | 153 |
| 173 // static | 154 // static |
| 174 void SupervisedUserService::RegisterProfilePrefs( | 155 void SupervisedUserService::RegisterProfilePrefs( |
| 175 user_prefs::PrefRegistrySyncable* registry) { | 156 user_prefs::PrefRegistrySyncable* registry) { |
| 157 registry->RegisterDictionaryPref(prefs::kSupervisedUserApprovedExtensions); | |
| 176 registry->RegisterDictionaryPref(prefs::kSupervisedUserManualHosts); | 158 registry->RegisterDictionaryPref(prefs::kSupervisedUserManualHosts); |
| 177 registry->RegisterDictionaryPref(prefs::kSupervisedUserManualURLs); | 159 registry->RegisterDictionaryPref(prefs::kSupervisedUserManualURLs); |
| 178 registry->RegisterIntegerPref(prefs::kDefaultSupervisedUserFilteringBehavior, | 160 registry->RegisterIntegerPref(prefs::kDefaultSupervisedUserFilteringBehavior, |
| 179 SupervisedUserURLFilter::ALLOW); | 161 SupervisedUserURLFilter::ALLOW); |
| 180 registry->RegisterBooleanPref(prefs::kSupervisedUserCreationAllowed, true); | 162 registry->RegisterBooleanPref(prefs::kSupervisedUserCreationAllowed, true); |
| 181 registry->RegisterBooleanPref(prefs::kSupervisedUserSafeSites, true); | 163 registry->RegisterBooleanPref(prefs::kSupervisedUserSafeSites, true); |
| 182 for (const char* pref : kCustodianInfoPrefs) { | 164 for (const char* pref : kCustodianInfoPrefs) { |
| 183 registry->RegisterStringPref(pref, std::string()); | 165 registry->RegisterStringPref(pref, std::string()); |
| 184 } | 166 } |
| 185 } | 167 } |
| (...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 256 } | 238 } |
| 257 | 239 |
| 258 void SupervisedUserService::ReportURL(const GURL& url, | 240 void SupervisedUserService::ReportURL(const GURL& url, |
| 259 const SuccessCallback& callback) { | 241 const SuccessCallback& callback) { |
| 260 if (url_reporter_) | 242 if (url_reporter_) |
| 261 url_reporter_->ReportUrl(url, callback); | 243 url_reporter_->ReportUrl(url, callback); |
| 262 else | 244 else |
| 263 callback.Run(false); | 245 callback.Run(false); |
| 264 } | 246 } |
| 265 | 247 |
| 248 void SupervisedUserService::AddExtensionInstallRequest( | |
| 249 const std::string& extension_id, | |
| 250 const base::Version& version, | |
| 251 const SuccessCallback& callback) { | |
| 252 std::string id = GetExtensionRequestId(extension_id, version); | |
| 253 AddPermissionRequestInternal(base::Bind(CreateExtensionInstallRequest, id), | |
| 254 callback, 0); | |
| 255 } | |
| 256 | |
| 257 void SupervisedUserService::AddExtensionInstallRequest( | |
| 258 const std::string& extension_id, | |
| 259 const base::Version& version) { | |
| 260 std::string id = GetExtensionRequestId(extension_id, version); | |
| 261 AddPermissionRequestInternal(base::Bind(CreateExtensionInstallRequest, id), | |
| 262 base::Bind(ExtensionInstallRequestSent, id), 0); | |
| 263 } | |
| 264 | |
| 266 void SupervisedUserService::AddExtensionUpdateRequest( | 265 void SupervisedUserService::AddExtensionUpdateRequest( |
| 267 const std::string& extension_id, | 266 const std::string& extension_id, |
| 268 const base::Version& version, | 267 const base::Version& version, |
| 269 const SuccessCallback& callback) { | 268 const SuccessCallback& callback) { |
| 270 std::string id = GetExtensionUpdateRequestId(extension_id, version); | 269 std::string id = GetExtensionRequestId(extension_id, version); |
| 271 AddPermissionRequestInternal( | 270 AddPermissionRequestInternal( |
| 272 base::Bind(CreateExtensionUpdateRequest, id), callback, 0); | 271 base::Bind(CreateExtensionUpdateRequest, id), callback, 0); |
| 273 } | 272 } |
| 274 | 273 |
| 275 void SupervisedUserService::AddExtensionUpdateRequest( | 274 void SupervisedUserService::AddExtensionUpdateRequest( |
| 276 const std::string& extension_id, | 275 const std::string& extension_id, |
| 277 const base::Version& version) { | 276 const base::Version& version) { |
| 278 std::string id = GetExtensionUpdateRequestId(extension_id, version); | 277 std::string id = GetExtensionRequestId(extension_id, version); |
| 279 AddExtensionUpdateRequest(extension_id, version, | 278 AddExtensionUpdateRequest(extension_id, version, |
| 280 base::Bind(ExtensionUpdateRequestSent, id)); | 279 base::Bind(ExtensionUpdateRequestSent, id)); |
| 281 } | 280 } |
| 282 | 281 |
| 282 void SupervisedUserService::UpdateApprovedExtensionVersion( | |
| 283 const std::string& extension_id, | |
| 284 const base::Version& version) { | |
| 285 approved_extensions_map_[extension_id] = version; | |
| 286 std::string key = SupervisedUserSettingsService::MakeSplitSettingKey( | |
| 287 supervised_users::kApprovedExtensions, extension_id); | |
| 288 std::unique_ptr<base::Value> version_value( | |
| 289 new base::StringValue(version.GetString())); | |
| 290 | |
| 291 GetSettingsService()->UpdateSetting(key, std::move(version_value)); | |
| 292 | |
| 293 EnableExtensionIfPossible(extension_id); | |
| 294 } | |
| 295 | |
| 296 void SupervisedUserService::EnableExtensionIfPossible( | |
| 297 const std::string& extension_id) { | |
| 298 ExtensionService* service = | |
| 299 ExtensionSystem::Get(profile_)->extension_service(); | |
| 300 ExtensionPrefs* extension_prefs = ExtensionPrefs::Get(profile_); | |
| 301 // Check if the extension was pending custodian approval. | |
| 302 if (extension_prefs->HasDisableReason( | |
| 303 extension_id, Extension::DISABLE_CUSTODIAN_APPROVAL_REQUIRED)) { | |
| 304 extension_prefs->RemoveDisableReason( | |
| 305 extension_id, Extension::DISABLE_CUSTODIAN_APPROVAL_REQUIRED); | |
| 306 // If no other disable reasons, enable it. | |
| 307 if (!extension_prefs->GetDisableReasons(extension_id)) { | |
| 308 // Try to enable the extension, this will call the ManagmentPolicy and | |
| 309 // properly enable the extension if possible. | |
| 310 service->EnableExtension(extension_id); | |
| 311 } | |
| 312 } | |
| 313 } | |
| 314 | |
| 283 // static | 315 // static |
| 284 std::string SupervisedUserService::GetExtensionUpdateRequestId( | 316 std::string SupervisedUserService::GetExtensionRequestId( |
| 285 const std::string& extension_id, | 317 const std::string& extension_id, |
| 286 const base::Version& version) { | 318 const base::Version& version) { |
| 287 return base::StringPrintf("%s:%s", extension_id.c_str(), | 319 return base::StringPrintf("%s:%s", extension_id.c_str(), |
| 288 version.GetString().c_str()); | 320 version.GetString().c_str()); |
| 289 } | 321 } |
| 290 | 322 |
| 291 std::string SupervisedUserService::GetCustodianEmailAddress() const { | 323 std::string SupervisedUserService::GetCustodianEmailAddress() const { |
| 292 std::string email = profile_->GetPrefs()->GetString( | 324 std::string email = profile_->GetPrefs()->GetString( |
| 293 prefs::kSupervisedUserCustodianEmail); | 325 prefs::kSupervisedUserCustodianEmail); |
| 294 #if defined(OS_CHROMEOS) | 326 #if defined(OS_CHROMEOS) |
| (...skipping 221 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 516 profile_(profile), | 548 profile_(profile), |
| 517 active_(false), | 549 active_(false), |
| 518 delegate_(NULL), | 550 delegate_(NULL), |
| 519 waiting_for_sync_initialization_(false), | 551 waiting_for_sync_initialization_(false), |
| 520 is_profile_active_(false), | 552 is_profile_active_(false), |
| 521 did_init_(false), | 553 did_init_(false), |
| 522 did_shutdown_(false), | 554 did_shutdown_(false), |
| 523 blacklist_state_(BlacklistLoadState::NOT_LOADED), | 555 blacklist_state_(BlacklistLoadState::NOT_LOADED), |
| 524 weak_ptr_factory_(this) { | 556 weak_ptr_factory_(this) { |
| 525 url_filter_context_.ui_url_filter()->AddObserver(this); | 557 url_filter_context_.ui_url_filter()->AddObserver(this); |
| 558 extensions::ExtensionRegistry::Get(profile)->AddObserver(this); | |
| 526 } | 559 } |
| 527 | 560 |
| 528 void SupervisedUserService::SetActive(bool active) { | 561 void SupervisedUserService::SetActive(bool active) { |
| 529 if (active_ == active) | 562 if (active_ == active) |
| 530 return; | 563 return; |
| 531 active_ = active; | 564 active_ = active; |
| 532 | 565 |
| 533 if (!delegate_ || !delegate_->SetActive(active_)) { | 566 if (!delegate_ || !delegate_->SetActive(active_)) { |
| 534 if (active_) { | 567 if (active_) { |
| 535 #if !defined(OS_ANDROID) | 568 #if !defined(OS_ANDROID) |
| (...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 580 | 613 |
| 581 #if defined(ENABLE_EXTENSIONS) | 614 #if defined(ENABLE_EXTENSIONS) |
| 582 SetExtensionsActive(); | 615 SetExtensionsActive(); |
| 583 #endif | 616 #endif |
| 584 | 617 |
| 585 if (active_) { | 618 if (active_) { |
| 586 pref_change_registrar_.Add( | 619 pref_change_registrar_.Add( |
| 587 prefs::kDefaultSupervisedUserFilteringBehavior, | 620 prefs::kDefaultSupervisedUserFilteringBehavior, |
| 588 base::Bind(&SupervisedUserService::OnDefaultFilteringBehaviorChanged, | 621 base::Bind(&SupervisedUserService::OnDefaultFilteringBehaviorChanged, |
| 589 base::Unretained(this))); | 622 base::Unretained(this))); |
| 623 pref_change_registrar_.Add( | |
| 624 prefs::kSupervisedUserApprovedExtensions, | |
| 625 base::Bind(&SupervisedUserService::UpdateApprovedExtensions, | |
| 626 base::Unretained(this))); | |
| 590 pref_change_registrar_.Add(prefs::kSupervisedUserSafeSites, | 627 pref_change_registrar_.Add(prefs::kSupervisedUserSafeSites, |
| 591 base::Bind(&SupervisedUserService::OnSafeSitesSettingChanged, | 628 base::Bind(&SupervisedUserService::OnSafeSitesSettingChanged, |
| 592 base::Unretained(this))); | 629 base::Unretained(this))); |
| 593 pref_change_registrar_.Add(prefs::kSupervisedUserManualHosts, | 630 pref_change_registrar_.Add(prefs::kSupervisedUserManualHosts, |
| 594 base::Bind(&SupervisedUserService::UpdateManualHosts, | 631 base::Bind(&SupervisedUserService::UpdateManualHosts, |
| 595 base::Unretained(this))); | 632 base::Unretained(this))); |
| 596 pref_change_registrar_.Add(prefs::kSupervisedUserManualURLs, | 633 pref_change_registrar_.Add(prefs::kSupervisedUserManualURLs, |
| 597 base::Bind(&SupervisedUserService::UpdateManualURLs, | 634 base::Bind(&SupervisedUserService::UpdateManualURLs, |
| 598 base::Unretained(this))); | 635 base::Unretained(this))); |
| 599 for (const char* pref : kCustodianInfoPrefs) { | 636 for (const char* pref : kCustodianInfoPrefs) { |
| 600 pref_change_registrar_.Add(pref, | 637 pref_change_registrar_.Add(pref, |
| 601 base::Bind(&SupervisedUserService::OnCustodianInfoChanged, | 638 base::Bind(&SupervisedUserService::OnCustodianInfoChanged, |
| 602 base::Unretained(this))); | 639 base::Unretained(this))); |
| 603 } | 640 } |
| 604 | 641 |
| 605 // Initialize the filter. | 642 // Initialize the filter. |
| 606 OnDefaultFilteringBehaviorChanged(); | 643 OnDefaultFilteringBehaviorChanged(); |
| 607 OnSafeSitesSettingChanged(); | 644 OnSafeSitesSettingChanged(); |
| 608 whitelist_service_->Init(); | 645 whitelist_service_->Init(); |
| 609 UpdateManualHosts(); | 646 UpdateManualHosts(); |
| 610 UpdateManualURLs(); | 647 UpdateManualURLs(); |
| 648 UpdateApprovedExtensions(); | |
| 611 | 649 |
| 612 #if !defined(OS_ANDROID) | 650 #if !defined(OS_ANDROID) |
| 613 // TODO(bauerb): Get rid of the platform-specific #ifdef here. | 651 // TODO(bauerb): Get rid of the platform-specific #ifdef here. |
| 614 // http://crbug.com/313377 | 652 // http://crbug.com/313377 |
| 615 BrowserList::AddObserver(this); | 653 BrowserList::AddObserver(this); |
| 616 #endif | 654 #endif |
| 617 } else { | 655 } else { |
| 618 permissions_creators_.clear(); | 656 permissions_creators_.clear(); |
| 619 url_reporter_.reset(); | 657 url_reporter_.reset(); |
| 620 | 658 |
| 621 pref_change_registrar_.Remove( | 659 pref_change_registrar_.Remove( |
| 622 prefs::kDefaultSupervisedUserFilteringBehavior); | 660 prefs::kDefaultSupervisedUserFilteringBehavior); |
| 661 pref_change_registrar_.Remove(prefs::kSupervisedUserApprovedExtensions); | |
| 623 pref_change_registrar_.Remove(prefs::kSupervisedUserManualHosts); | 662 pref_change_registrar_.Remove(prefs::kSupervisedUserManualHosts); |
| 624 pref_change_registrar_.Remove(prefs::kSupervisedUserManualURLs); | 663 pref_change_registrar_.Remove(prefs::kSupervisedUserManualURLs); |
| 625 for (const char* pref : kCustodianInfoPrefs) { | 664 for (const char* pref : kCustodianInfoPrefs) { |
| 626 pref_change_registrar_.Remove(pref); | 665 pref_change_registrar_.Remove(pref); |
| 627 } | 666 } |
| 628 | 667 |
| 629 url_filter_context_.Clear(); | 668 url_filter_context_.Clear(); |
| 630 FOR_EACH_OBSERVER( | 669 FOR_EACH_OBSERVER( |
| 631 SupervisedUserServiceObserver, observer_list_, OnURLFilterChanged()); | 670 SupervisedUserServiceObserver, observer_list_, OnURLFilterChanged()); |
| 632 | 671 |
| (...skipping 275 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 908 bool result = it.value().GetAsBoolean(&allow); | 947 bool result = it.value().GetAsBoolean(&allow); |
| 909 DCHECK(result); | 948 DCHECK(result); |
| 910 (*url_map)[GURL(it.key())] = allow; | 949 (*url_map)[GURL(it.key())] = allow; |
| 911 } | 950 } |
| 912 url_filter_context_.SetManualURLs(std::move(url_map)); | 951 url_filter_context_.SetManualURLs(std::move(url_map)); |
| 913 | 952 |
| 914 FOR_EACH_OBSERVER( | 953 FOR_EACH_OBSERVER( |
| 915 SupervisedUserServiceObserver, observer_list_, OnURLFilterChanged()); | 954 SupervisedUserServiceObserver, observer_list_, OnURLFilterChanged()); |
| 916 } | 955 } |
| 917 | 956 |
| 957 void SupervisedUserService::UpdateApprovedExtensions() { | |
| 958 const base::DictionaryValue* dict = profile_->GetPrefs()->GetDictionary( | |
| 959 prefs::kSupervisedUserApprovedExtensions); | |
| 960 approved_extensions_map_.clear(); | |
| 961 for (base::DictionaryValue::Iterator it(*dict); !it.IsAtEnd(); it.Advance()) { | |
| 962 std::string version_str; | |
| 963 bool result = it.value().GetAsString(&version_str); | |
| 964 DCHECK(result); | |
| 965 base::Version version(version_str); | |
| 966 if (version.IsValid()) | |
| 967 approved_extensions_map_[it.key()] = version; | |
| 968 else | |
| 969 LOG(WARNING) << "Invalid version number " << version_str; | |
| 970 } | |
| 971 | |
| 972 for (const auto& extensions_entry : approved_extensions_map_) { | |
| 973 EnableExtensionIfPossible(extensions_entry.first); | |
| 974 } | |
| 975 } | |
| 976 | |
| 918 std::string SupervisedUserService::GetSupervisedUserName() const { | 977 std::string SupervisedUserService::GetSupervisedUserName() const { |
| 919 #if defined(OS_CHROMEOS) | 978 #if defined(OS_CHROMEOS) |
| 920 // The active user can be NULL in unit tests. | 979 // The active user can be NULL in unit tests. |
| 921 if (user_manager::UserManager::Get()->GetActiveUser()) { | 980 if (user_manager::UserManager::Get()->GetActiveUser()) { |
| 922 return UTF16ToUTF8(user_manager::UserManager::Get()->GetUserDisplayName( | 981 return UTF16ToUTF8(user_manager::UserManager::Get()->GetUserDisplayName( |
| 923 user_manager::UserManager::Get()->GetActiveUser()->GetAccountId())); | 982 user_manager::UserManager::Get()->GetActiveUser()->GetAccountId())); |
| 924 } | 983 } |
| 925 return std::string(); | 984 return std::string(); |
| 926 #else | 985 #else |
| 927 return profile_->GetPrefs()->GetString(prefs::kProfileName); | 986 return profile_->GetPrefs()->GetString(prefs::kProfileName); |
| 928 #endif | 987 #endif |
| 929 } | 988 } |
| 930 | 989 |
| 931 void SupervisedUserService::OnForceSessionSyncChanged() { | 990 void SupervisedUserService::OnForceSessionSyncChanged() { |
| 932 includes_sync_sessions_type_ = | 991 includes_sync_sessions_type_ = |
| 933 profile_->GetPrefs()->GetBoolean(prefs::kForceSessionSync); | 992 profile_->GetPrefs()->GetBoolean(prefs::kForceSessionSync); |
| 934 ProfileSyncServiceFactory::GetForProfile(profile_) | 993 ProfileSyncServiceFactory::GetForProfile(profile_) |
| 935 ->ReconfigureDatatypeManager(); | 994 ->ReconfigureDatatypeManager(); |
| 936 } | 995 } |
| 937 | 996 |
| 997 void SupervisedUserService::OnExtensionInstalled( | |
| 998 content::BrowserContext* browser_context, | |
| 999 const extensions::Extension* extension, | |
| 1000 bool is_update) { | |
| 1001 // This callback is responsible only for updating the approved version | |
| 1002 // upon extension update if it doesn't require extra permission. | |
| 1003 if (!is_update) | |
| 1004 return; | |
| 1005 | |
| 1006 ExtensionPrefs* extension_prefs = ExtensionPrefs::Get(profile_); | |
| 1007 const std::string& id = extension->id(); | |
| 1008 | |
| 1009 // If an already approved extension is updated without requiring | |
| 1010 // new permissions, we update the approved_version and re-enable it. | |
| 1011 if (!extension_prefs->HasDisableReason( | |
| 1012 id, Extension::DISABLE_PERMISSIONS_INCREASE) | |
|
Marc Treib
2016/06/09 13:44:09
wrong indent?
mamir
2016/06/09 14:04:40
According to eclipse, not. According to git cl fo
| |
| 1013 && approved_extensions_map_.count(id) > 0 | |
| 1014 && approved_extensions_map_[id] < *extension->version()) { | |
| 1015 UpdateApprovedExtensionVersion(id, *extension->version()); | |
| 1016 } | |
| 1017 } | |
| 1018 | |
| 938 void SupervisedUserService::Shutdown() { | 1019 void SupervisedUserService::Shutdown() { |
| 939 if (!did_init_) | 1020 if (!did_init_) |
| 940 return; | 1021 return; |
| 941 DCHECK(!did_shutdown_); | 1022 DCHECK(!did_shutdown_); |
| 942 did_shutdown_ = true; | 1023 did_shutdown_ = true; |
| 943 if (ProfileIsSupervised()) { | 1024 if (ProfileIsSupervised()) { |
| 944 content::RecordAction(UserMetricsAction("ManagedUsers_QuitBrowser")); | 1025 content::RecordAction(UserMetricsAction("ManagedUsers_QuitBrowser")); |
| 945 } | 1026 } |
| 946 SetActive(false); | 1027 SetActive(false); |
| 947 | 1028 |
| 948 ProfileSyncService* sync_service = | 1029 ProfileSyncService* sync_service = |
| 949 ProfileSyncServiceFactory::GetForProfile(profile_); | 1030 ProfileSyncServiceFactory::GetForProfile(profile_); |
| 950 | 1031 |
| 951 // Can be null in tests. | 1032 // Can be null in tests. |
| 952 if (sync_service) | 1033 if (sync_service) |
| 953 sync_service->RemovePreferenceProvider(this); | 1034 sync_service->RemovePreferenceProvider(this); |
| 954 } | 1035 } |
| 955 | 1036 |
| 956 #if defined(ENABLE_EXTENSIONS) | 1037 #if defined(ENABLE_EXTENSIONS) |
| 1038 SupervisedUserService::ExtensionState SupervisedUserService::GetExtensionState( | |
| 1039 const Extension& extension) const { | |
| 1040 bool was_installed_by_default = extension.was_installed_by_default(); | |
| 1041 #if defined(OS_CHROMEOS) | |
| 1042 // On Chrome OS all external sources are controlled by us so it means that | |
| 1043 // they are "default". Method was_installed_by_default returns false because | |
| 1044 // extensions creation flags are ignored in case of default extensions with | |
| 1045 // update URL(the flags aren't passed to OnExternalExtensionUpdateUrlFound). | |
| 1046 // TODO(dpolukhin): remove this Chrome OS specific code as soon as creation | |
| 1047 // flags are not ignored. | |
| 1048 was_installed_by_default = | |
| 1049 extensions::Manifest::IsExternalLocation(extension->location()); | |
| 1050 #endif | |
| 1051 // Note: Component extensions are protected from modification/uninstallation | |
| 1052 // anyway, so there's no need to enforce them again for supervised users. | |
| 1053 // Also, leave policy-installed extensions alone - they have their own | |
| 1054 // management; in particular we don't want to override the force-install list. | |
| 1055 if (extensions::Manifest::IsComponentLocation(extension.location()) || | |
| 1056 extensions::Manifest::IsPolicyLocation(extension.location()) || | |
| 1057 extension.is_theme() || extension.from_bookmark() || | |
| 1058 extension.is_shared_module() || was_installed_by_default) { | |
| 1059 return ExtensionState::ALLOWED; | |
| 1060 } | |
| 1061 | |
| 1062 if (extension.was_installed_by_custodian()) | |
| 1063 return ExtensionState::FORCED; | |
| 1064 | |
| 1065 // TODO(mamir): if(on blacklist) return BLOCKED; | |
| 1066 if (!base::FeatureList::IsEnabled( | |
| 1067 supervised_users::kSupervisedUserInitiatedExtensionInstall)) { | |
| 1068 return ExtensionState::BLOCKED; | |
| 1069 } | |
| 1070 | |
| 1071 const std::string& id = extension.id(); | |
| 1072 | |
| 1073 auto extension_it = approved_extensions_map_.find(id); | |
| 1074 if (extension_it == approved_extensions_map_.end() || | |
| 1075 extension_it->second != *(extension.version())) { | |
| 1076 return ExtensionState::REQUIRE_APPROVAL; | |
| 1077 } | |
| 1078 | |
| 1079 if (ExtensionPrefs::Get(profile_)->HasDisableReason( | |
| 1080 id, Extension::DISABLE_PERMISSIONS_INCREASE)) { | |
| 1081 return ExtensionState::REQUIRE_APPROVAL; | |
| 1082 } | |
| 1083 | |
| 1084 return ExtensionState::ALLOWED; | |
| 1085 } | |
| 1086 | |
| 957 std::string SupervisedUserService::GetDebugPolicyProviderName() const { | 1087 std::string SupervisedUserService::GetDebugPolicyProviderName() const { |
| 958 // Save the string space in official builds. | 1088 // Save the string space in official builds. |
| 959 #ifdef NDEBUG | 1089 #ifdef NDEBUG |
| 960 NOTREACHED(); | 1090 NOTREACHED(); |
| 961 return std::string(); | 1091 return std::string(); |
| 962 #else | 1092 #else |
| 963 return "Supervised User Service"; | 1093 return "Supervised User Service"; |
| 964 #endif | 1094 #endif |
| 965 } | 1095 } |
| 966 | 1096 |
| 967 bool SupervisedUserService::UserMayLoad(const extensions::Extension* extension, | 1097 bool SupervisedUserService::UserMayLoad(const Extension* extension, |
| 968 base::string16* error) const { | 1098 base::string16* error) const { |
| 969 DCHECK(ProfileIsSupervised()); | 1099 DCHECK(ProfileIsSupervised()); |
| 970 ExtensionState result = GetExtensionState(extension); | 1100 ExtensionState result = GetExtensionState(*extension); |
| 971 bool may_load = (result != EXTENSION_BLOCKED); | 1101 bool may_load = (result != ExtensionState::BLOCKED); |
| 972 if (!may_load && error) | 1102 if (!may_load && error) |
| 973 *error = GetExtensionsLockedMessage(); | 1103 *error = GetExtensionsLockedMessage(); |
| 974 return may_load; | 1104 return may_load; |
| 975 } | 1105 } |
| 976 | 1106 |
| 977 bool SupervisedUserService::UserMayModifySettings( | 1107 bool SupervisedUserService::UserMayModifySettings(const Extension* extension, |
| 978 const extensions::Extension* extension, | 1108 base::string16* error) const { |
| 979 base::string16* error) const { | |
| 980 DCHECK(ProfileIsSupervised()); | 1109 DCHECK(ProfileIsSupervised()); |
| 981 ExtensionState result = GetExtensionState(extension); | 1110 ExtensionState result = GetExtensionState(*extension); |
| 982 bool may_modify = (result == EXTENSION_ALLOWED); | 1111 // While the following check allows the SU to modify the settings and enable |
| 1112 // or disable the extension, MustRemainDisabled properly takes care of | |
| 1113 // keeping an extension disabled when required. | |
| 1114 // For custodian-installed extensions, the state is always FORCED, even if | |
| 1115 // it's waiting for an update approval. | |
| 1116 bool may_modify = (result != ExtensionState::FORCED); | |
| 983 if (!may_modify && error) | 1117 if (!may_modify && error) |
| 984 *error = GetExtensionsLockedMessage(); | 1118 *error = GetExtensionsLockedMessage(); |
| 985 return may_modify; | 1119 return may_modify; |
| 986 } | 1120 } |
| 987 | 1121 |
| 988 // Note: Having MustRemainInstalled always say "true" for custodian-installed | 1122 // Note: Having MustRemainInstalled always say "true" for custodian-installed |
| 989 // extensions does NOT prevent remote uninstalls (which is a bit unexpected, but | 1123 // extensions does NOT prevent remote uninstalls (which is a bit unexpected, but |
| 990 // exactly what we want). | 1124 // exactly what we want). |
| 991 bool SupervisedUserService::MustRemainInstalled( | 1125 bool SupervisedUserService::MustRemainInstalled(const Extension* extension, |
| 992 const extensions::Extension* extension, | 1126 base::string16* error) const { |
| 993 base::string16* error) const { | |
| 994 DCHECK(ProfileIsSupervised()); | 1127 DCHECK(ProfileIsSupervised()); |
| 995 ExtensionState result = GetExtensionState(extension); | 1128 ExtensionState result = GetExtensionState(*extension); |
| 996 bool may_not_uninstall = (result == EXTENSION_FORCED); | 1129 bool may_not_uninstall = (result == ExtensionState::FORCED); |
| 997 if (may_not_uninstall && error) | 1130 if (may_not_uninstall && error) |
| 998 *error = GetExtensionsLockedMessage(); | 1131 *error = GetExtensionsLockedMessage(); |
| 999 return may_not_uninstall; | 1132 return may_not_uninstall; |
| 1000 } | 1133 } |
| 1001 | 1134 |
| 1135 bool SupervisedUserService::MustRemainDisabled(const Extension* extension, | |
| 1136 Extension::DisableReason* reason, | |
| 1137 base::string16* error) const { | |
| 1138 DCHECK(ProfileIsSupervised()); | |
| 1139 ExtensionState state = GetExtensionState(*extension); | |
| 1140 bool must_remain_disabled = (state == ExtensionState::BLOCKED) || | |
| 1141 (state == ExtensionState::REQUIRE_APPROVAL); | |
| 1142 | |
| 1143 if (must_remain_disabled) { | |
| 1144 if (reason) | |
| 1145 *reason = Extension::DISABLE_CUSTODIAN_APPROVAL_REQUIRED; | |
| 1146 if (error) | |
| 1147 *error = l10n_util::GetStringUTF16(IDS_EXTENSIONS_LOCKED_SUPERVISED_USER); | |
| 1148 if (base::FeatureList::IsEnabled( | |
| 1149 supervised_users::kSupervisedUserInitiatedExtensionInstall)) { | |
| 1150 // If the Extension isn't pending a custodian approval already, send | |
| 1151 // an approval request. | |
| 1152 ExtensionPrefs* extension_prefs = ExtensionPrefs::Get(profile_); | |
| 1153 if (!extension_prefs->HasDisableReason( | |
| 1154 extension->id(), | |
| 1155 Extension::DISABLE_CUSTODIAN_APPROVAL_REQUIRED)) { | |
| 1156 // MustRemainDisabled is a const method and hence cannot call | |
| 1157 // AddExtensionInstallRequest directly. | |
| 1158 SupervisedUserService* supervised_user_service = | |
| 1159 SupervisedUserServiceFactory::GetForProfile(profile_); | |
| 1160 supervised_user_service->AddExtensionInstallRequest( | |
| 1161 extension->id(), *extension->version()); | |
| 1162 } | |
| 1163 } | |
| 1164 } | |
| 1165 return must_remain_disabled; | |
| 1166 } | |
| 1167 | |
| 1002 void SupervisedUserService::SetExtensionsActive() { | 1168 void SupervisedUserService::SetExtensionsActive() { |
| 1003 extensions::ExtensionSystem* extension_system = | 1169 extensions::ExtensionSystem* extension_system = |
| 1004 extensions::ExtensionSystem::Get(profile_); | 1170 extensions::ExtensionSystem::Get(profile_); |
| 1005 extensions::ManagementPolicy* management_policy = | 1171 extensions::ManagementPolicy* management_policy = |
| 1006 extension_system->management_policy(); | 1172 extension_system->management_policy(); |
| 1007 | 1173 |
| 1008 if (management_policy) { | 1174 if (management_policy) { |
| 1009 if (active_) | 1175 if (active_) |
| 1010 management_policy->RegisterProvider(this); | 1176 management_policy->RegisterProvider(this); |
| 1011 else | 1177 else |
| (...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1057 content::RecordAction(UserMetricsAction("ManagedUsers_SwitchProfile")); | 1223 content::RecordAction(UserMetricsAction("ManagedUsers_SwitchProfile")); |
| 1058 | 1224 |
| 1059 is_profile_active_ = profile_became_active; | 1225 is_profile_active_ = profile_became_active; |
| 1060 } | 1226 } |
| 1061 #endif // !defined(OS_ANDROID) | 1227 #endif // !defined(OS_ANDROID) |
| 1062 | 1228 |
| 1063 void SupervisedUserService::OnSiteListUpdated() { | 1229 void SupervisedUserService::OnSiteListUpdated() { |
| 1064 FOR_EACH_OBSERVER( | 1230 FOR_EACH_OBSERVER( |
| 1065 SupervisedUserServiceObserver, observer_list_, OnURLFilterChanged()); | 1231 SupervisedUserServiceObserver, observer_list_, OnURLFilterChanged()); |
| 1066 } | 1232 } |
| OLD | NEW |