summaryrefslogtreecommitdiffstats
path: root/chrome
diff options
context:
space:
mode:
Diffstat (limited to 'chrome')
-rw-r--r--chrome/browser/blocked_plugin_manager.cc8
-rw-r--r--chrome/browser/blocked_plugin_manager.h1
-rw-r--r--chrome/browser/content_setting_bubble_model.cc2
-rw-r--r--chrome/browser/host_content_settings_map.cc11
-rw-r--r--chrome/browser/metrics/user_metrics.h5
5 files changed, 5 insertions, 22 deletions
diff --git a/chrome/browser/blocked_plugin_manager.cc b/chrome/browser/blocked_plugin_manager.cc
index 2da3653..d8c67bb 100644
--- a/chrome/browser/blocked_plugin_manager.cc
+++ b/chrome/browser/blocked_plugin_manager.cc
@@ -9,7 +9,6 @@
#include "base/command_line.h"
#include "base/utf_string_conversions.h"
#include "chrome/browser/host_content_settings_map.h"
-#include "chrome/browser/metrics/user_metrics.h"
#include "chrome/browser/profile.h"
#include "chrome/browser/renderer_host/render_view_host.h"
#include "chrome/browser/tab_contents/tab_contents.h"
@@ -26,7 +25,6 @@ void BlockedPluginManager::OnNonSandboxedPluginBlocked(
const string16& name) {
plugin_ = plugin;
name_ = name;
- UserMetrics::RecordAction(UserMetricsAction("ClickToPlay_InfobarShown"));
tab_contents_->AddInfoBar(this);
}
@@ -64,7 +62,6 @@ SkBitmap* BlockedPluginManager::GetIcon() const {
}
bool BlockedPluginManager::Accept() {
- UserMetrics::RecordAction(UserMetricsAction("ClickToPlay_LoadAll_Infobar"));
tab_contents_->render_view_host()->LoadBlockedPlugins();
return true;
}
@@ -72,7 +69,6 @@ bool BlockedPluginManager::Accept() {
bool BlockedPluginManager::Cancel() {
DCHECK(CommandLine::ForCurrentProcess()->HasSwitch(
switches::kEnableResourceContentSettings));
- UserMetrics::RecordAction(UserMetricsAction("ClickToPlay_AllowAlways"));
tab_contents_->profile()->GetHostContentSettingsMap()->AddExceptionForURL(
tab_contents_->GetURL(), CONTENT_SETTINGS_TYPE_PLUGINS, plugin_,
CONTENT_SETTING_ALLOW);
@@ -80,10 +76,6 @@ bool BlockedPluginManager::Cancel() {
return true;
}
-void BlockedPluginManager::InfoBarDismissed() {
- UserMetrics::RecordAction(UserMetricsAction("ClickToPlay_Dismiss_Infobar"));
-}
-
bool BlockedPluginManager::LinkClicked(WindowOpenDisposition disposition) {
// TODO(bauerb): Navigate to a help page explaining why we blocked the plugin,
// once we have one.
diff --git a/chrome/browser/blocked_plugin_manager.h b/chrome/browser/blocked_plugin_manager.h
index fcabdb2..cc3c31a 100644
--- a/chrome/browser/blocked_plugin_manager.h
+++ b/chrome/browser/blocked_plugin_manager.h
@@ -27,7 +27,6 @@ class BlockedPluginManager : public RenderViewHostDelegate::BlockedPlugin,
virtual SkBitmap* GetIcon() const;
virtual bool Accept();
virtual bool Cancel();
- virtual void InfoBarDismissed();
virtual bool LinkClicked(WindowOpenDisposition disposition);
private:
diff --git a/chrome/browser/content_setting_bubble_model.cc b/chrome/browser/content_setting_bubble_model.cc
index ed0700a..ba36e4d 100644
--- a/chrome/browser/content_setting_bubble_model.cc
+++ b/chrome/browser/content_setting_bubble_model.cc
@@ -10,7 +10,6 @@
#include "chrome/browser/blocked_popup_container.h"
#include "chrome/browser/geolocation/geolocation_content_settings_map.h"
#include "chrome/browser/host_content_settings_map.h"
-#include "chrome/browser/metrics/user_metrics.h"
#include "chrome/browser/prefs/pref_service.h"
#include "chrome/browser/profile.h"
#include "chrome/browser/renderer_host/render_view_host.h"
@@ -299,7 +298,6 @@ class ContentSettingPluginBubbleModel : public ContentSettingSingleRadioGroup {
virtual void OnLoadPluginsLinkClicked() {
DCHECK(!CommandLine::ForCurrentProcess()->HasSwitch(
switches::kDisableClickToPlay));
- UserMetrics::RecordAction(UserMetricsAction("ClickToPlay_LoadAll_Bubble"));
if (tab_contents()) {
tab_contents()->render_view_host()->LoadBlockedPlugins();
}
diff --git a/chrome/browser/host_content_settings_map.cc b/chrome/browser/host_content_settings_map.cc
index 9c01798..8cb31f6 100644
--- a/chrome/browser/host_content_settings_map.cc
+++ b/chrome/browser/host_content_settings_map.cc
@@ -8,7 +8,6 @@
#include "base/string_util.h"
#include "base/utf_string_conversions.h"
#include "chrome/browser/chrome_thread.h"
-#include "chrome/browser/metrics/user_metrics.h"
#include "chrome/browser/prefs/pref_service.h"
#include "chrome/browser/profile.h"
#include "chrome/browser/prefs/scoped_pref_update.h"
@@ -702,17 +701,11 @@ void HostContentSettingsMap::SetBlockNonsandboxedPlugins(bool block) {
block_nonsandboxed_plugins_ = block;
}
-
PrefService* prefs = profile_->GetPrefs();
- if (block) {
- UserMetrics::RecordAction(
- UserMetricsAction("BlockNonsandboxedPlugins_Enable"));
+ if (block)
prefs->SetBoolean(prefs::kBlockNonsandboxedPlugins, true);
- } else {
- UserMetrics::RecordAction(
- UserMetricsAction("BlockNonsandboxedPlugins_Disable"));
+ else
prefs->ClearPref(prefs::kBlockNonsandboxedPlugins);
- }
}
void HostContentSettingsMap::ResetToDefaults() {
diff --git a/chrome/browser/metrics/user_metrics.h b/chrome/browser/metrics/user_metrics.h
index b1420ae..5436595 100644
--- a/chrome/browser/metrics/user_metrics.h
+++ b/chrome/browser/metrics/user_metrics.h
@@ -32,8 +32,9 @@ class UserMetrics {
// not good: "SSLDialogShown", "PageLoaded", "DiskFull"
// We use this to gather anonymized information about how users are
// interacting with the browser.
- // WARNING: Call this function exactly like this:
- // UserMetrics::RecordAction(UserMetricsAction("foo bar"));
+ // WARNING: Call this function exactly like this, with the string literal
+ // inline:
+ // UserMetrics::RecordAction("foo bar", profile);
// because otherwise our processing scripts won't pick up on new actions.
//
// For more complicated situations (like when there are many different