summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authortony@chromium.org <tony@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-04-14 03:10:15 +0000
committertony@chromium.org <tony@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-04-14 03:10:15 +0000
commitafef28800cee5741bfa275cde610cbb2d6ab2c07 (patch)
tree2370c05ea57755b2bf6f7b643466e28bf3553e7c
parent84fd34f492ca3d1dc47ee8d43e0f011cefa63ac8 (diff)
downloadchromium_src-afef28800cee5741bfa275cde610cbb2d6ab2c07.zip
chromium_src-afef28800cee5741bfa275cde610cbb2d6ab2c07.tar.gz
chromium_src-afef28800cee5741bfa275cde610cbb2d6ab2c07.tar.bz2
Revert 44443 - Try removing the enableuserstylesheet flag.
This is a test run to see how it impacts startup perf (if any). BUG=38182 TBR=chase Review URL: http://codereview.chromium.org/1595027 TBR=tony@chromium.org Review URL: http://codereview.chromium.org/1560034 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@44444 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r--chrome/browser/tab_contents/render_view_host_delegate_helper.cc8
-rw-r--r--chrome/common/chrome_switches.cc3
-rw-r--r--chrome/common/chrome_switches.h1
3 files changed, 10 insertions, 2 deletions
diff --git a/chrome/browser/tab_contents/render_view_host_delegate_helper.cc b/chrome/browser/tab_contents/render_view_host_delegate_helper.cc
index 79b2fa1..977674d 100644
--- a/chrome/browser/tab_contents/render_view_host_delegate_helper.cc
+++ b/chrome/browser/tab_contents/render_view_host_delegate_helper.cc
@@ -193,9 +193,13 @@ WebPreferences RenderViewHostDelegateHelper::GetWebkitPrefs(
command_line.HasSwitch(switches::kAllowFileAccessFromFiles);
web_prefs.show_composited_layer_borders =
command_line.HasSwitch(switches::kShowCompositedLayerBorders);
- web_prefs.user_style_sheet_enabled = true;
- web_prefs.user_style_sheet_location =
+ web_prefs.user_style_sheet_enabled =
+ command_line.HasSwitch(switches::kEnableUserStyleSheet);
+ if (web_prefs.user_style_sheet_enabled) {
+ web_prefs.user_style_sheet_location =
profile->GetUserStyleSheetWatcher()->user_style_sheet();
+ }
+
}
web_prefs.uses_universal_detector =
diff --git a/chrome/common/chrome_switches.cc b/chrome/common/chrome_switches.cc
index 8e95e65..260df1b 100644
--- a/chrome/common/chrome_switches.cc
+++ b/chrome/common/chrome_switches.cc
@@ -316,6 +316,9 @@ const char kEnableSyncTypedUrls[] = "enable-sync-typed-urls";
// enabled or not.
const char kEnableUserDataDirProfiles[] = "enable-udd-profiles";
+// Enable user style sheet (read from User Style Sheet in the profile dir).
+const char kEnableUserStyleSheet[] = "enable-user-stylesheet";
+
// Enables the option to show tabs as a vertical stack down the side of the
// browser window.
const char kEnableVerticalTabs[] = "enable-vertical-tabs";
diff --git a/chrome/common/chrome_switches.h b/chrome/common/chrome_switches.h
index e2383ca..3b541b9 100644
--- a/chrome/common/chrome_switches.h
+++ b/chrome/common/chrome_switches.h
@@ -106,6 +106,7 @@ extern const char kEnableSyncPreferences[];
extern const char kEnableSyncThemes[];
extern const char kEnableSyncTypedUrls[];
extern const char kEnableUserDataDirProfiles[];
+extern const char kEnableUserStyleSheet[];
extern const char kEnableVerticalTabs[];
extern const char kEnableVideoLayering[];
extern const char kEnableVideoLogging[];