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

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: Devlin and Maksim 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
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 1184 matching lines...) Expand 10 before | Expand all | Expand 10 after
1195 bool go_off_the_record) { 1195 bool go_off_the_record) {
1196 TRACE_EVENT0("browser", "ProfileManager::DoFinalInitForServices"); 1196 TRACE_EVENT0("browser", "ProfileManager::DoFinalInitForServices");
1197 1197
1198 #if BUILDFLAG(ENABLE_EXTENSIONS) 1198 #if BUILDFLAG(ENABLE_EXTENSIONS)
1199 // Ensure that the HostContentSettingsMap has been created before the 1199 // Ensure that the HostContentSettingsMap has been created before the
1200 // ExtensionSystem is initialized otherwise the ExtensionSystem will be 1200 // ExtensionSystem is initialized otherwise the ExtensionSystem will be
1201 // registered twice 1201 // registered twice
1202 HostContentSettingsMap* content_settings_map = 1202 HostContentSettingsMap* content_settings_map =
1203 HostContentSettingsMapFactory::GetForProfile(profile); 1203 HostContentSettingsMapFactory::GetForProfile(profile);
1204 1204
1205 bool extensions_enabled = !go_off_the_record;
1206 #if defined(OS_CHROMEOS)
1207 if (base::CommandLine::ForCurrentProcess()->HasSwitch(
1208 switches::kEnableLoginScreenApps) &&
1209 chromeos::ProfileHelper::IsSigninProfile(profile)) {
1210 extensions_enabled = true;
1211 }
1212 #endif
1205 extensions::ExtensionSystem::Get(profile)->InitForRegularProfile( 1213 extensions::ExtensionSystem::Get(profile)->InitForRegularProfile(
1206 !go_off_the_record); 1214 extensions_enabled);
1207 // During tests, when |profile| is an instance of TestingProfile, 1215 // During tests, when |profile| is an instance of TestingProfile,
1208 // ExtensionSystem might not create an ExtensionService. 1216 // ExtensionSystem might not create an ExtensionService.
1209 // This block is duplicated in the HostContentSettingsMapFactory 1217 // This block is duplicated in the HostContentSettingsMapFactory
1210 // ::BuildServiceInstanceFor method, it should be called once when both the 1218 // ::BuildServiceInstanceFor method, it should be called once when both the
1211 // HostContentSettingsMap and the extension_service are set up. 1219 // HostContentSettingsMap and the extension_service are set up.
1212 if (extensions::ExtensionSystem::Get(profile)->extension_service()) { 1220 if (extensions::ExtensionSystem::Get(profile)->extension_service()) {
1213 extensions::ExtensionSystem::Get(profile)->extension_service()-> 1221 extensions::ExtensionSystem::Get(profile)->extension_service()->
1214 RegisterContentSettings(content_settings_map); 1222 RegisterContentSettings(content_settings_map);
1215 } 1223 }
1216 // Set the block extensions bit on the ExtensionService. There likely are no 1224 // Set the block extensions bit on the ExtensionService. There likely are no
(...skipping 548 matching lines...) Expand 10 before | Expand all | Expand 10 after
1765 1773
1766 const base::FilePath new_active_profile_dir = 1774 const base::FilePath new_active_profile_dir =
1767 found_entry ? found_entry->GetPath() : GenerateNextProfileDirectoryPath(); 1775 found_entry ? found_entry->GetPath() : GenerateNextProfileDirectoryPath();
1768 FinishDeletingProfile(profile_dir, new_active_profile_dir); 1776 FinishDeletingProfile(profile_dir, new_active_profile_dir);
1769 } 1777 }
1770 #endif // !defined(OS_ANDROID) 1778 #endif // !defined(OS_ANDROID)
1771 1779
1772 ProfileManagerWithoutInit::ProfileManagerWithoutInit( 1780 ProfileManagerWithoutInit::ProfileManagerWithoutInit(
1773 const base::FilePath& user_data_dir) : ProfileManager(user_data_dir) { 1781 const base::FilePath& user_data_dir) : ProfileManager(user_data_dir) {
1774 } 1782 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698