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

Unified Diff: chrome/browser/chrome_browser_main.cc

Issue 11572036: Do not load extension system in the Profile import process. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: rollback to patchset 10 Created 8 years 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
« no previous file with comments | « no previous file | chrome/browser/extensions/component_loader.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/chrome_browser_main.cc
diff --git a/chrome/browser/chrome_browser_main.cc b/chrome/browser/chrome_browser_main.cc
index 690abc712bd27efe085a37faff93bab4b4073011..f350e4b11ae42d13deec4861282eb15ac999c7e9 100644
--- a/chrome/browser/chrome_browser_main.cc
+++ b/chrome/browser/chrome_browser_main.cc
@@ -427,11 +427,6 @@ bool ProcessSingletonNotificationCallback(const CommandLine& command_line,
return true;
}
-bool HasImportSwitch(const CommandLine& command_line) {
- return (command_line.HasSwitch(switches::kImport) ||
- command_line.HasSwitch(switches::kImportFromFile));
-}
-
void LaunchDevToolsHandlerIfNeeded(Profile* profile,
const CommandLine& command_line) {
if (command_line.HasSwitch(::switches::kRemoteDebuggingPort)) {
@@ -696,7 +691,7 @@ int ChromeBrowserMainParts::PreCreateThreadsImpl() {
is_first_run_ =
(first_run::IsChromeFirstRun() ||
parsed_command_line().HasSwitch(switches::kFirstRun)) &&
- !HasImportSwitch(parsed_command_line());
+ !ProfileManager::IsImportProcess(parsed_command_line());
#endif
FilePath local_state_path;
@@ -1026,7 +1021,7 @@ int ChromeBrowserMainParts::PreMainMessageLoopRunImpl() {
// from other browsers. In case this process is a short-lived "import"
// process that another browser runs just to import the settings, we
// don't want to be checking for another browser process, by design.
- pass_command_line = !HasImportSwitch(parsed_command_line());
+ pass_command_line = !ProfileManager::IsImportProcess(parsed_command_line());
#endif
// If we're being launched just to check the connector policy, we are
@@ -1139,7 +1134,7 @@ int ChromeBrowserMainParts::PreMainMessageLoopRunImpl() {
// that exits when this task has finished.
// TODO(port): Port the Mac's IPC-based implementation to other platforms to
// replace this implementation. http://crbug.com/22142
- if (HasImportSwitch(parsed_command_line())) {
+ if (ProfileManager::IsImportProcess(parsed_command_line())) {
return first_run::ImportNow(profile_, parsed_command_line());
}
#endif
@@ -1185,7 +1180,8 @@ int ChromeBrowserMainParts::PreMainMessageLoopRunImpl() {
if (is_first_run_) {
PreInteractiveFirstRunInit();
- if (!first_run_ui_bypass_) {
+ if (!first_run_ui_bypass_ ||
+ parsed_command_line().HasSwitch(switches::kFirstRunForceImport)) {
first_run::AutoImport(profile_,
master_prefs_->homepage_defined,
master_prefs_->do_import_items,
« no previous file with comments | « no previous file | chrome/browser/extensions/component_loader.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698