summaryrefslogtreecommitdiffstats
path: root/chrome/browser/browser_init.cc
diff options
context:
space:
mode:
authoraa@chromium.org <aa@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-06-08 23:32:35 +0000
committeraa@chromium.org <aa@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-06-08 23:32:35 +0000
commit1f082083982da6f2261a2bc1bb74247a903ba2ee (patch)
tree2e36454a01a4c2cc2c0f8ffb5fe429f2e69e0fe9 /chrome/browser/browser_init.cc
parent78c6dd65953307dd0b550a16d92267a450c01309 (diff)
downloadchromium_src-1f082083982da6f2261a2bc1bb74247a903ba2ee.zip
chromium_src-1f082083982da6f2261a2bc1bb74247a903ba2ee.tar.gz
chromium_src-1f082083982da6f2261a2bc1bb74247a903ba2ee.tar.bz2
blech
Review URL: http://codereview.chromium.org/118412 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@17910 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/browser_init.cc')
-rw-r--r--chrome/browser/browser_init.cc18
1 files changed, 10 insertions, 8 deletions
diff --git a/chrome/browser/browser_init.cc b/chrome/browser/browser_init.cc
index 91483dc..12adeb0 100644
--- a/chrome/browser/browser_init.cc
+++ b/chrome/browser/browser_init.cc
@@ -679,6 +679,16 @@ bool BrowserInit::ProcessCmdLineImpl(const CommandLine& command_line,
profile,
static_cast<size_t>(expected_tab_count));
}
+
+ // Extension should be loaded from path which is specified by flag
+ // |kLoadExtension| once and only when the browser process is starting up.
+ if (command_line.HasSwitch(switches::kLoadExtension)) {
+ std::wstring path_string =
+ command_line.GetSwitchValue(switches::kLoadExtension);
+ FilePath path = FilePath::FromWStringHack(path_string);
+ profile->GetExtensionsService()->LoadExtension(path);
+ profile->GetUserScriptMaster()->AddWatchedPath(path);
+ }
}
// Allow the command line to override the persisted setting of home page.
@@ -699,14 +709,6 @@ bool BrowserInit::ProcessCmdLineImpl(const CommandLine& command_line,
profile, expected_tabs);
}
- if (command_line.HasSwitch(switches::kLoadExtension)) {
- std::wstring path_string =
- command_line.GetSwitchValue(switches::kLoadExtension);
- FilePath path = FilePath::FromWStringHack(path_string);
- profile->GetExtensionsService()->LoadExtension(path);
- profile->GetUserScriptMaster()->AddWatchedPath(path);
- }
-
if (command_line.HasSwitch(switches::kInstallExtension)) {
std::wstring path_string =
command_line.GetSwitchValue(switches::kInstallExtension);