diff options
author | mark@chromium.org <mark@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-03-06 20:13:23 +0000 |
---|---|---|
committer | mark@chromium.org <mark@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-03-06 20:13:23 +0000 |
commit | 0cd957bf0e56ca2b3520485caf204a289bf82f78 (patch) | |
tree | fd4329db311e5961d1eff7a0ca20939f66b3ca9f /chrome/browser/profile.cc | |
parent | 90c7aa0fe476246b74608e564ea09f0d2a4951da (diff) | |
download | chromium_src-0cd957bf0e56ca2b3520485caf204a289bf82f78.zip chromium_src-0cd957bf0e56ca2b3520485caf204a289bf82f78.tar.gz chromium_src-0cd957bf0e56ca2b3520485caf204a289bf82f78.tar.bz2 |
Adds a command line flag, --user-scripts-dir=..., to specify a directory to use
in place of the default user scripts location. This eases development of
userscripts since you can simply point the browser at your SCM checkout location
instead of needing to try to sync things into your local userscripts directory.
Code review URL: http://codereview.chromium.org/37011
Checking in for slightlyoff
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@11146 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/profile.cc')
-rw-r--r-- | chrome/browser/profile.cc | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/chrome/browser/profile.cc b/chrome/browser/profile.cc index 9289c2a..88bc072 100644 --- a/chrome/browser/profile.cc +++ b/chrome/browser/profile.cc @@ -381,8 +381,15 @@ void ProfileImpl::InitExtensions() { FilePath script_dir; if (user_scripts_enabled) { - script_dir = GetPath(); - script_dir = script_dir.Append(chrome::kUserScriptsDirname); + + if (command_line->HasSwitch(switches::kUserScriptsDir)) { + std::wstring path_string = + command_line->GetSwitchValue(switches::kUserScriptsDir); + script_dir = FilePath::FromWStringHack(path_string); + } else { + script_dir = GetPath(); + script_dir = script_dir.Append(chrome::kUserScriptsDirname); + } } ExtensionErrorReporter::Init(true); // allow noisy errors. |