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

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: comment about test-only function 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
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,
« no previous file with comments | « no previous file | chrome/browser/extensions/extension_service.cc » ('j') | chrome/browser/first_run/first_run_browsertest.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698