OLD | NEW |
---|---|
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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/profiles/profile_manager.h" | 5 #include "chrome/browser/profiles/profile_manager.h" |
6 | 6 |
7 #include <set> | 7 #include <set> |
8 | 8 |
9 #include "base/bind.h" | 9 #include "base/bind.h" |
10 #include "base/command_line.h" | 10 #include "base/command_line.h" |
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
68 | 68 |
69 #if defined(ENABLE_EXTENSIONS) | 69 #if defined(ENABLE_EXTENSIONS) |
70 #include "chrome/browser/extensions/extension_service.h" | 70 #include "chrome/browser/extensions/extension_service.h" |
71 #include "extensions/browser/extension_registry.h" | 71 #include "extensions/browser/extension_registry.h" |
72 #include "extensions/browser/extension_system.h" | 72 #include "extensions/browser/extension_system.h" |
73 #include "extensions/common/extension_set.h" | 73 #include "extensions/common/extension_set.h" |
74 #include "extensions/common/manifest.h" | 74 #include "extensions/common/manifest.h" |
75 #endif | 75 #endif |
76 | 76 |
77 #if defined(ENABLE_SUPERVISED_USERS) | 77 #if defined(ENABLE_SUPERVISED_USERS) |
78 #include "chrome/browser/content_settings/content_settings_supervised_provider.h " | |
78 #include "chrome/browser/supervised_user/child_accounts/child_account_service.h" | 79 #include "chrome/browser/supervised_user/child_accounts/child_account_service.h" |
79 #include "chrome/browser/supervised_user/child_accounts/child_account_service_fa ctory.h" | 80 #include "chrome/browser/supervised_user/child_accounts/child_account_service_fa ctory.h" |
80 #include "chrome/browser/supervised_user/supervised_user_service.h" | 81 #include "chrome/browser/supervised_user/supervised_user_service.h" |
81 #include "chrome/browser/supervised_user/supervised_user_service_factory.h" | 82 #include "chrome/browser/supervised_user/supervised_user_service_factory.h" |
83 #include "chrome/browser/supervised_user/supervised_user_settings_service.h" | |
84 #include "chrome/browser/supervised_user/supervised_user_settings_service_factor y.h" | |
82 #endif | 85 #endif |
83 | 86 |
84 #if !defined(OS_IOS) | 87 #if !defined(OS_IOS) |
85 #include "chrome/browser/sessions/session_service_factory.h" | 88 #include "chrome/browser/sessions/session_service_factory.h" |
86 #include "chrome/browser/ui/browser_list.h" | 89 #include "chrome/browser/ui/browser_list.h" |
87 #endif // !defined (OS_IOS) | 90 #endif // !defined (OS_IOS) |
88 | 91 |
89 #if defined(OS_WIN) | 92 #if defined(OS_WIN) |
90 #include "base/win/metro.h" | 93 #include "base/win/metro.h" |
91 #include "chrome/installer/util/browser_distribution.h" | 94 #include "chrome/installer/util/browser_distribution.h" |
(...skipping 938 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1030 ->BlockAllExtensions(); | 1033 ->BlockAllExtensions(); |
1031 } | 1034 } |
1032 | 1035 |
1033 #endif | 1036 #endif |
1034 #if defined(ENABLE_SUPERVISED_USERS) | 1037 #if defined(ENABLE_SUPERVISED_USERS) |
1035 // Initialization needs to happen after extension system initialization (for | 1038 // Initialization needs to happen after extension system initialization (for |
1036 // extension::ManagementPolicy) and InitProfileUserPrefs (for setting the | 1039 // extension::ManagementPolicy) and InitProfileUserPrefs (for setting the |
1037 // initializing the supervised flag if necessary). | 1040 // initializing the supervised flag if necessary). |
1038 ChildAccountServiceFactory::GetForProfile(profile)->Init(); | 1041 ChildAccountServiceFactory::GetForProfile(profile)->Init(); |
1039 SupervisedUserServiceFactory::GetForProfile(profile)->Init(); | 1042 SupervisedUserServiceFactory::GetForProfile(profile)->Init(); |
1043 SupervisedUserSettingsService* supervised_service = | |
1044 SupervisedUserSettingsServiceFactory::GetForProfile(profile); | |
1045 scoped_ptr<content_settings::SupervisedProvider> supervised_provider( | |
1046 new content_settings::SupervisedProvider()); | |
1047 supervised_service->Subscribe(base::Bind( | |
1048 &content_settings::SupervisedProvider::OnSupervisedSettingsAvailable, | |
1049 base::Unretained(supervised_provider.get()))); | |
1050 profile->GetHostContentSettingsMap()->RegisterProvider( | |
Bernhard Bauer
2015/02/26 18:03:54
Can we do this when the HCSM is created instead?
knn
2015/02/27 10:43:53
This is called when the profile is created. Isn't
Bernhard Bauer
2015/02/27 11:20:25
It is, but the right place for it is in the Profil
knn
2015/02/27 12:05:15
Acknowledged.
| |
1051 HostContentSettingsMap::SUPERVISED_PROVIDER, supervised_provider.Pass()); | |
1040 #endif | 1052 #endif |
1041 // Start the deferred task runners once the profile is loaded. | 1053 // Start the deferred task runners once the profile is loaded. |
1042 StartupTaskRunnerServiceFactory::GetForProfile(profile)-> | 1054 StartupTaskRunnerServiceFactory::GetForProfile(profile)-> |
1043 StartDeferredTaskRunners(); | 1055 StartDeferredTaskRunners(); |
1044 | 1056 |
1045 // Activate data reduction proxy. This creates a request context and makes a | 1057 // Activate data reduction proxy. This creates a request context and makes a |
1046 // URL request to check if the data reduction proxy server is reachable. | 1058 // URL request to check if the data reduction proxy server is reachable. |
1047 DataReductionProxyChromeSettingsFactory::GetForBrowserContext(profile)-> | 1059 DataReductionProxyChromeSettingsFactory::GetForBrowserContext(profile)-> |
1048 MaybeActivateDataReductionProxy(true); | 1060 MaybeActivateDataReductionProxy(true); |
1049 | 1061 |
(...skipping 341 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1391 last_non_supervised_profile_path.BaseName().MaybeAsASCII()); | 1403 last_non_supervised_profile_path.BaseName().MaybeAsASCII()); |
1392 FinishDeletingProfile(profile_to_delete_path); | 1404 FinishDeletingProfile(profile_to_delete_path); |
1393 } | 1405 } |
1394 } | 1406 } |
1395 } | 1407 } |
1396 #endif | 1408 #endif |
1397 | 1409 |
1398 ProfileManagerWithoutInit::ProfileManagerWithoutInit( | 1410 ProfileManagerWithoutInit::ProfileManagerWithoutInit( |
1399 const base::FilePath& user_data_dir) : ProfileManager(user_data_dir) { | 1411 const base::FilePath& user_data_dir) : ProfileManager(user_data_dir) { |
1400 } | 1412 } |
OLD | NEW |