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

Side by Side Diff: chrome/browser/profiles/profile_manager.cc

Issue 2149953002: Enable login screen apps. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Stefan feedback Created 3 years, 9 months 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
« no previous file with comments | « chrome/browser/extensions/external_provider_impl.cc ('k') | chrome/common/chrome_switches.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 1193 matching lines...) Expand 10 before | Expand all | Expand 10 after
1204 bool go_off_the_record) { 1204 bool go_off_the_record) {
1205 TRACE_EVENT0("browser", "ProfileManager::DoFinalInitForServices"); 1205 TRACE_EVENT0("browser", "ProfileManager::DoFinalInitForServices");
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;
1215 #if defined(OS_CHROMEOS)
1216 if (base::CommandLine::ForCurrentProcess()->HasSwitch(
1217 switches::kEnableLoginScreenApps) &&
1218 chromeos::ProfileHelper::IsSigninProfile(profile)) {
1219 extensions_enabled = true;
1220 }
1221 #endif
1214 extensions::ExtensionSystem::Get(profile)->InitForRegularProfile( 1222 extensions::ExtensionSystem::Get(profile)->InitForRegularProfile(
1215 !go_off_the_record); 1223 extensions_enabled);
1216 // During tests, when |profile| is an instance of TestingProfile, 1224 // During tests, when |profile| is an instance of TestingProfile,
1217 // ExtensionSystem might not create an ExtensionService. 1225 // ExtensionSystem might not create an ExtensionService.
1218 // This block is duplicated in the HostContentSettingsMapFactory 1226 // This block is duplicated in the HostContentSettingsMapFactory
1219 // ::BuildServiceInstanceFor method, it should be called once when both the 1227 // ::BuildServiceInstanceFor method, it should be called once when both the
1220 // HostContentSettingsMap and the extension_service are set up. 1228 // HostContentSettingsMap and the extension_service are set up.
1221 if (extensions::ExtensionSystem::Get(profile)->extension_service()) { 1229 if (extensions::ExtensionSystem::Get(profile)->extension_service()) {
1222 extensions::ExtensionSystem::Get(profile)->extension_service()-> 1230 extensions::ExtensionSystem::Get(profile)->extension_service()->
1223 RegisterContentSettings(content_settings_map); 1231 RegisterContentSettings(content_settings_map);
1224 } 1232 }
1225 // Set the block extensions bit on the ExtensionService. There likely are no 1233 // Set the block extensions bit on the ExtensionService. There likely are no
(...skipping 561 matching lines...) Expand 10 before | Expand all | Expand 10 after
1787 1795
1788 const base::FilePath new_active_profile_dir = 1796 const base::FilePath new_active_profile_dir =
1789 found_entry ? found_entry->GetPath() : GenerateNextProfileDirectoryPath(); 1797 found_entry ? found_entry->GetPath() : GenerateNextProfileDirectoryPath();
1790 FinishDeletingProfile(profile_dir, new_active_profile_dir); 1798 FinishDeletingProfile(profile_dir, new_active_profile_dir);
1791 } 1799 }
1792 #endif // !defined(OS_ANDROID) 1800 #endif // !defined(OS_ANDROID)
1793 1801
1794 ProfileManagerWithoutInit::ProfileManagerWithoutInit( 1802 ProfileManagerWithoutInit::ProfileManagerWithoutInit(
1795 const base::FilePath& user_data_dir) : ProfileManager(user_data_dir) { 1803 const base::FilePath& user_data_dir) : ProfileManager(user_data_dir) {
1796 } 1804 }
OLDNEW
« no previous file with comments | « chrome/browser/extensions/external_provider_impl.cc ('k') | chrome/common/chrome_switches.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698