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..cff5b1e3a5c8112e073791bba044e73bf79d7920 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)) { |
Miranda Callahan
2012/12/17 19:04:34
style for this file is to put || at the end of the
tapted
2012/12/18 02:25:58
Done.
|
first_run::AutoImport(profile_, |
master_prefs_->homepage_defined, |
master_prefs_->do_import_items, |