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

Unified Diff: chrome/browser/profile.cc

Issue 418043: Remove --enable-user-script and associated tests. (Closed)
Patch Set: Created 11 years, 1 month 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 | « chrome/browser/extensions/extension_startup_unittest.cc ('k') | 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
diff --git a/chrome/browser/profile.cc b/chrome/browser/profile.cc
index eb998ba478fde1007a07c7611fcc1688b5b76a20..b42fc6d7feeb09f876d0245abe9d3ff9b0863ad5 100644
--- a/chrome/browser/profile.cc
+++ b/chrome/browser/profile.cc
@@ -147,7 +147,6 @@ void Profile::RegisterUserPrefs(PrefService* prefs) {
IDS_SPELLCHECK_DICTIONARY);
prefs->RegisterBooleanPref(prefs::kEnableSpellCheck, true);
prefs->RegisterBooleanPref(prefs::kEnableAutoSpellCorrect, true);
- prefs->RegisterBooleanPref(prefs::kEnableUserScripts, false);
#if defined(OS_LINUX)
prefs->RegisterBooleanPref(prefs::kUsesSystemTheme, false);
#endif
@@ -679,24 +678,14 @@ void ProfileImpl::InitExtensions() {
const CommandLine* command_line = CommandLine::ForCurrentProcess();
PrefService* prefs = GetPrefs();
- bool user_scripts_enabled =
- command_line->HasSwitch(switches::kEnableUserScripts) ||
- prefs->GetBoolean(prefs::kEnableUserScripts);
-
- FilePath script_dir;
- if (user_scripts_enabled) {
- 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.
+
+ FilePath script_dir; // Don't look for user scripts in any directory.
+ // TODO(aa): We should just remove this functionality,
+ // since it isn't used anymore.
user_script_master_ = new UserScriptMaster(script_dir);
+
extensions_service_ = new ExtensionsService(
this,
CommandLine::ForCurrentProcess(),
« no previous file with comments | « chrome/browser/extensions/extension_startup_unittest.cc ('k') | chrome/common/chrome_switches.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698