summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormnaganov@chromium.org <mnaganov@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-03-13 13:09:10 +0000
committermnaganov@chromium.org <mnaganov@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-03-13 13:09:10 +0000
commitd64bbadf8de48fab8dafa5874f51f5ae99c588cc (patch)
tree531192b1946502eccf6b8fd98ecdeb286fb5ba1c
parent598b0a3dbf9d5d5b4d56597def445bb2b71f7d13 (diff)
downloadchromium_src-d64bbadf8de48fab8dafa5874f51f5ae99c588cc.zip
chromium_src-d64bbadf8de48fab8dafa5874f51f5ae99c588cc.tar.gz
chromium_src-d64bbadf8de48fab8dafa5874f51f5ae99c588cc.tar.bz2
Remove --enable-memory-info flag
Chrome exposes quantized rate-limited information about memory through 'window.performance.memory'. This should be enough for the majority of web developers. Developers who need more detailed data can use tools like Telemetry to obtain JS heap size status via DevTools remote debugging protocol. BUG=350339 TBR=palmer@chromium.org Review URL: https://codereview.chromium.org/192653002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@256807 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r--chrome/browser/chrome_content_browser_client.cc6
-rw-r--r--chrome/browser/policy/configuration_policy_handler_list_factory.cc3
-rw-r--r--chrome/browser/prefs/command_line_pref_store.cc1
-rw-r--r--chrome/common/chrome_switches.cc5
-rw-r--r--chrome/common/chrome_switches.h1
-rw-r--r--chrome/common/pref_names.cc3
-rw-r--r--chrome/common/pref_names.h1
-rw-r--r--chrome/test/data/policy/policy_test_cases.json6
-rw-r--r--components/policy/resources/policy_templates.json11
-rw-r--r--content/public/common/common_param_traits_macros.h1
-rw-r--r--content/renderer/web_preferences.cc3
-rw-r--r--webkit/common/webpreferences.cc1
-rw-r--r--webkit/common/webpreferences.h1
13 files changed, 8 insertions, 35 deletions
diff --git a/chrome/browser/chrome_content_browser_client.cc b/chrome/browser/chrome_content_browser_client.cc
index 232c2c8..0ee29b6 100644
--- a/chrome/browser/chrome_content_browser_client.cc
+++ b/chrome/browser/chrome_content_browser_client.cc
@@ -661,10 +661,6 @@ void ChromeContentBrowserClient::RegisterProfilePrefs(
prefs::kEnableHyperlinkAuditing,
true,
user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF);
- registry->RegisterBooleanPref(
- prefs::kEnableMemoryInfo,
- false,
- user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF);
}
// static
@@ -2293,8 +2289,6 @@ void ChromeContentBrowserClient::OverrideWebkitPrefs(
if (prefs->GetBoolean(prefs::kDisable3DAPIs))
web_prefs->experimental_webgl_enabled = false;
- web_prefs->memory_info_enabled =
- prefs->GetBoolean(prefs::kEnableMemoryInfo);
web_prefs->allow_displaying_insecure_content =
prefs->GetBoolean(prefs::kWebKitAllowDisplayingInsecureContent);
web_prefs->allow_running_insecure_content =
diff --git a/chrome/browser/policy/configuration_policy_handler_list_factory.cc b/chrome/browser/policy/configuration_policy_handler_list_factory.cc
index 4fa4e09..ca3d384 100644
--- a/chrome/browser/policy/configuration_policy_handler_list_factory.cc
+++ b/chrome/browser/policy/configuration_policy_handler_list_factory.cc
@@ -320,9 +320,6 @@ const PolicyToPreferenceMapEntry kSimplePolicyMap[] = {
{ key::kURLWhitelist,
policy_prefs::kUrlWhitelist,
base::Value::TYPE_LIST },
- { key::kEnableMemoryInfo,
- prefs::kEnableMemoryInfo,
- base::Value::TYPE_BOOLEAN },
{ key::kRestrictSigninToPattern,
prefs::kGoogleServicesUsernamePattern,
base::Value::TYPE_STRING },
diff --git a/chrome/browser/prefs/command_line_pref_store.cc b/chrome/browser/prefs/command_line_pref_store.cc
index 299658d..e50c1e7 100644
--- a/chrome/browser/prefs/command_line_pref_store.cc
+++ b/chrome/browser/prefs/command_line_pref_store.cc
@@ -59,7 +59,6 @@ const CommandLinePrefStore::BooleanSwitchToPreferenceMapEntry
true },
{ switches::kEnableUnrestrictedSSL3Fallback,
prefs::kEnableUnrestrictedSSL3Fallback, true },
- { switches::kEnableMemoryInfo, prefs::kEnableMemoryInfo, true },
#if defined(GOOGLE_CHROME_BUILD)
{ switches::kDisablePrintPreview, prefs::kPrintPreviewDisabled, true },
#else
diff --git a/chrome/common/chrome_switches.cc b/chrome/common/chrome_switches.cc
index 1db1958..a82aee5 100644
--- a/chrome/common/chrome_switches.cc
+++ b/chrome/common/chrome_switches.cc
@@ -609,11 +609,6 @@ const char kEnableIPv6[] = "enable-ipv6";
// Enables experimentation with launching ephemeral apps via hyperlinks.
const char kEnableLinkableEphemeralApps[] = "enable-linkable-ephemeral-apps";
-// Make the values returned to window.performance.memory more granular and more
-// up to date. Without this flag, the memory information is still available, but
-// it is bucketized and updated less frequently.
-const char kEnableMemoryInfo[] = "enable-memory-info";
-
// Enables metrics recording and reporting in the browser startup sequence, as
// if this was an official Chrome build where the user allowed metrics
// reporting. This is used for testing only.
diff --git a/chrome/common/chrome_switches.h b/chrome/common/chrome_switches.h
index 158e76e..e245addb 100644
--- a/chrome/common/chrome_switches.h
+++ b/chrome/common/chrome_switches.h
@@ -179,7 +179,6 @@ extern const char kEnableWebBasedSignin[];
extern const char kEnableIPv6[];
extern const char kEnableLinkableEphemeralApps[];
extern const char kEnableManagedStorage[];
-extern const char kEnableMemoryInfo[];
extern const char kEnableMetricsReportingForTesting[];
extern const char kEnableNaCl[];
extern const char kEnableNetBenchmarking[];
diff --git a/chrome/common/pref_names.cc b/chrome/common/pref_names.cc
index ec4a593..fbe03df 100644
--- a/chrome/common/pref_names.cc
+++ b/chrome/common/pref_names.cc
@@ -1168,9 +1168,6 @@ const char kEnableReferrers[] = "enable_referrers";
// Whether to send the DNT header.
const char kEnableDoNotTrack[] = "enable_do_not_track";
-// Boolean to enable reporting memory info to page.
-const char kEnableMemoryInfo[] = "enable_memory_info";
-
// GL_VENDOR string.
const char kGLVendorString[] = "gl_vendor_string";
diff --git a/chrome/common/pref_names.h b/chrome/common/pref_names.h
index a13e321..850b9ed 100644
--- a/chrome/common/pref_names.h
+++ b/chrome/common/pref_names.h
@@ -415,7 +415,6 @@ extern const char kCipherSuiteBlacklist[];
extern const char kEnableOriginBoundCerts[];
extern const char kDisableSSLRecordSplitting[];
extern const char kEnableUnrestrictedSSL3Fallback[];
-extern const char kEnableMemoryInfo[];
extern const char kGLVendorString[];
extern const char kGLRendererString[];
diff --git a/chrome/test/data/policy/policy_test_cases.json b/chrome/test/data/policy/policy_test_cases.json
index b7f5d5a..c11f95a 100644
--- a/chrome/test/data/policy/policy_test_cases.json
+++ b/chrome/test/data/policy/policy_test_cases.json
@@ -1451,11 +1451,7 @@
},
"EnableMemoryInfo": {
- "os": ["win", "linux", "mac", "chromeos"],
- "test_policy": { "EnableMemoryInfo": true },
- "pref_mappings": [
- { "pref": "enable_memory_info" }
- ]
+ "note": "This policy is retired, see http://crbug.com/350339."
},
"DisablePrintPreview": {
diff --git a/components/policy/resources/policy_templates.json b/components/policy/resources/policy_templates.json
index 3cdbba1..cbb7ac2 100644
--- a/components/policy/resources/policy_templates.json
+++ b/components/policy/resources/policy_templates.json
@@ -3513,18 +3513,21 @@
'name': 'EnableMemoryInfo',
'type': 'main',
'schema': { 'type': 'boolean' },
- 'supported_on': ['chrome.*:17-', 'chrome_os:18-'],
+ 'supported_on': ['chrome.*:17-34', 'chrome_os:18-34'],
'features': {
'dynamic_refresh': True,
'per_profile': True,
},
+ 'deprecated': True,
'future': True,
'example_value': False,
'id': 115,
- 'caption': '''Enable reporting memory info (JS heap size) to page''',
- 'desc': '''Allows pages to access JavaScript memory usage statistics.
+ 'caption': '''Enable reporting memory info (JS heap size) to page (deprecated)''',
+ 'desc': '''This policy has been retired as of <ph name="PRODUCT_NAME">$1<ex>Google Chrome</ex></ph> version 35.
- This settings makes the memory statistics from the Developer Tools Profiles panel available to the web page itself.''',
+ Memory info is anyway reported to page, regardless of the option value, but the sizes reported are
+ quantized and the rate of updates is limited for security reasons. To obtain real-time precise data,
+ please use tools like Telemetry.''',
},
{
'name': 'DisablePrintPreview',
diff --git a/content/public/common/common_param_traits_macros.h b/content/public/common/common_param_traits_macros.h
index 425c9f6..a1cece3 100644
--- a/content/public/common/common_param_traits_macros.h
+++ b/content/public/common/common_param_traits_macros.h
@@ -156,7 +156,6 @@ IPC_STRUCT_TRAITS_BEGIN(WebPreferences)
IPC_STRUCT_TRAITS_MEMBER(accelerated_compositing_for_3d_transforms_enabled)
IPC_STRUCT_TRAITS_MEMBER(accelerated_compositing_for_animation_enabled)
IPC_STRUCT_TRAITS_MEMBER(accelerated_compositing_for_video_enabled)
- IPC_STRUCT_TRAITS_MEMBER(memory_info_enabled)
IPC_STRUCT_TRAITS_MEMBER(allow_displaying_insecure_content)
IPC_STRUCT_TRAITS_MEMBER(allow_running_insecure_content)
IPC_STRUCT_TRAITS_MEMBER(enable_scroll_animator)
diff --git a/content/renderer/web_preferences.cc b/content/renderer/web_preferences.cc
index d755b1f..9ae1b0e 100644
--- a/content/renderer/web_preferences.cc
+++ b/content/renderer/web_preferences.cc
@@ -254,9 +254,6 @@ void ApplyWebPreferences(const WebPreferences& prefs, WebView* web_view) {
settings->setAcceleratedCompositingForCanvasEnabled(
prefs.experimental_webgl_enabled || prefs.accelerated_2d_canvas_enabled);
- // Enable memory info reporting to page if requested on the command line.
- settings->setMemoryInfoEnabled(prefs.memory_info_enabled);
-
settings->setAsynchronousSpellCheckingEnabled(
prefs.asynchronous_spell_checking_enabled);
settings->setUnifiedTextCheckerEnabled(prefs.unified_textchecker_enabled);
diff --git a/webkit/common/webpreferences.cc b/webkit/common/webpreferences.cc
index 2783e95..c6a430e 100644
--- a/webkit/common/webpreferences.cc
+++ b/webkit/common/webpreferences.cc
@@ -74,7 +74,6 @@ WebPreferences::WebPreferences()
deferred_filters_enabled(false),
gesture_tap_highlight_enabled(false),
accelerated_compositing_for_plugins_enabled(false),
- memory_info_enabled(false),
allow_displaying_insecure_content(true),
allow_running_insecure_content(false),
password_echo_enabled(false),
diff --git a/webkit/common/webpreferences.h b/webkit/common/webpreferences.h
index 3792b3c..8c04328 100644
--- a/webkit/common/webpreferences.h
+++ b/webkit/common/webpreferences.h
@@ -122,7 +122,6 @@ struct WEBKIT_COMMON_EXPORT WebPreferences {
bool deferred_filters_enabled;
bool gesture_tap_highlight_enabled;
bool accelerated_compositing_for_plugins_enabled;
- bool memory_info_enabled;
bool allow_displaying_insecure_content;
bool allow_running_insecure_content;
bool password_echo_enabled;