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 <stdint.h> | 7 #include <stdint.h> |
8 | 8 |
9 #include <map> | 9 #include <map> |
10 #include <set> | 10 #include <set> |
(...skipping 1195 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1206 | 1206 |
1207 #if BUILDFLAG(ENABLE_EXTENSIONS) | 1207 #if BUILDFLAG(ENABLE_EXTENSIONS) |
1208 // Ensure that the HostContentSettingsMap has been created before the | 1208 // Ensure that the HostContentSettingsMap has been created before the |
1209 // ExtensionSystem is initialized otherwise the ExtensionSystem will be | 1209 // ExtensionSystem is initialized otherwise the ExtensionSystem will be |
1210 // registered twice | 1210 // registered twice |
1211 HostContentSettingsMap* content_settings_map = | 1211 HostContentSettingsMap* content_settings_map = |
1212 HostContentSettingsMapFactory::GetForProfile(profile); | 1212 HostContentSettingsMapFactory::GetForProfile(profile); |
1213 | 1213 |
1214 bool extensions_enabled = !go_off_the_record; | 1214 bool extensions_enabled = !go_off_the_record; |
1215 #if defined(OS_CHROMEOS) | 1215 #if defined(OS_CHROMEOS) |
1216 if (base::CommandLine::ForCurrentProcess()->HasSwitch( | 1216 if (!base::CommandLine::ForCurrentProcess()->HasSwitch( |
1217 switches::kEnableLoginScreenApps) && | 1217 switches::kDisableLoginScreenApps) && |
1218 chromeos::ProfileHelper::IsSigninProfile(profile)) { | 1218 chromeos::ProfileHelper::IsSigninProfile(profile)) { |
1219 extensions_enabled = true; | 1219 extensions_enabled = true; |
1220 } | 1220 } |
1221 #endif | 1221 #endif |
1222 extensions::ExtensionSystem::Get(profile)->InitForRegularProfile( | 1222 extensions::ExtensionSystem::Get(profile)->InitForRegularProfile( |
1223 extensions_enabled); | 1223 extensions_enabled); |
1224 // During tests, when |profile| is an instance of TestingProfile, | 1224 // During tests, when |profile| is an instance of TestingProfile, |
1225 // ExtensionSystem might not create an ExtensionService. | 1225 // ExtensionSystem might not create an ExtensionService. |
1226 // This block is duplicated in the HostContentSettingsMapFactory | 1226 // This block is duplicated in the HostContentSettingsMapFactory |
1227 // ::BuildServiceInstanceFor method, it should be called once when both the | 1227 // ::BuildServiceInstanceFor method, it should be called once when both the |
(...skipping 566 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1794 | 1794 |
1795 const base::FilePath new_active_profile_dir = | 1795 const base::FilePath new_active_profile_dir = |
1796 found_entry ? found_entry->GetPath() : GenerateNextProfileDirectoryPath(); | 1796 found_entry ? found_entry->GetPath() : GenerateNextProfileDirectoryPath(); |
1797 FinishDeletingProfile(profile_dir, new_active_profile_dir); | 1797 FinishDeletingProfile(profile_dir, new_active_profile_dir); |
1798 } | 1798 } |
1799 #endif // !defined(OS_ANDROID) | 1799 #endif // !defined(OS_ANDROID) |
1800 | 1800 |
1801 ProfileManagerWithoutInit::ProfileManagerWithoutInit( | 1801 ProfileManagerWithoutInit::ProfileManagerWithoutInit( |
1802 const base::FilePath& user_data_dir) : ProfileManager(user_data_dir) { | 1802 const base::FilePath& user_data_dir) : ProfileManager(user_data_dir) { |
1803 } | 1803 } |
OLD | NEW |