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

Unified Diff: trunk/src/chrome/browser/profiles/profile_manager.cc

Issue 15968002: Revert 201837 "OOP import on Windows." (Closed) Base URL: svn://svn.chromium.org/chrome/
Patch Set: Created 7 years, 7 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 side-by-side diff with in-line comments
Download patch
Index: trunk/src/chrome/browser/profiles/profile_manager.cc
===================================================================
--- trunk/src/chrome/browser/profiles/profile_manager.cc (revision 201967)
+++ trunk/src/chrome/browser/profiles/profile_manager.cc (working copy)
@@ -713,6 +713,12 @@
}
}
+// static
+bool ProfileManager::IsImportProcess(const CommandLine& command_line) {
+ return (command_line.HasSwitch(switches::kImport) ||
+ command_line.HasSwitch(switches::kImportFromFile));
+}
+
void ProfileManager::SetWillImport() {
will_import_ = true;
}
@@ -788,13 +794,16 @@
void ProfileManager::DoFinalInitForServices(Profile* profile,
bool go_off_the_record) {
#if defined(ENABLE_EXTENSIONS)
- extensions::ExtensionSystem::Get(profile)->InitForRegularProfile(
- !go_off_the_record);
- // During tests, when |profile| is an instance of TestingProfile,
- // ExtensionSystem might not create an ExtensionService.
- if (extensions::ExtensionSystem::Get(profile)->extension_service()) {
- profile->GetHostContentSettingsMap()->RegisterExtensionService(
- extensions::ExtensionSystem::Get(profile)->extension_service());
+ const CommandLine& command_line = *CommandLine::ForCurrentProcess();
+ if (!IsImportProcess(command_line)) {
+ extensions::ExtensionSystem::Get(profile)->InitForRegularProfile(
+ !go_off_the_record);
+ // During tests, when |profile| is an instance of TestingProfile,
+ // ExtensionSystem might not create an ExtensionService.
+ if (extensions::ExtensionSystem::Get(profile)->extension_service()) {
+ profile->GetHostContentSettingsMap()->RegisterExtensionService(
+ extensions::ExtensionSystem::Get(profile)->extension_service());
+ }
}
#endif
#if defined(ENABLE_MANAGED_USERS)
« no previous file with comments | « trunk/src/chrome/browser/profiles/profile_manager.h ('k') | trunk/src/chrome/browser/sync/profile_sync_service_factory.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698