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

Unified Diff: chrome/browser/profile.cc

Issue 37011: Adds a command line flag, --user-scripts-dir=..., to specify a directory to u... (Closed) Base URL: http://src.chromium.org/svn/trunk/src/
Patch Set: '' Created 11 years, 10 months 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/common/chrome_switches.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/profile.cc
===================================================================
--- chrome/browser/profile.cc (revision 11129)
+++ chrome/browser/profile.cc (working copy)
@@ -381,8 +381,15 @@
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.
« no previous file with comments | « no previous file | chrome/common/chrome_switches.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698