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

Unified Diff: chrome/browser/ui/views/critical_notification_bubble_view.cc

Issue 8919017: Split UserMetrics into API vs. implementation. Move API to content/public. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Version for commit (merged again). Created 9 years 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
Index: chrome/browser/ui/views/critical_notification_bubble_view.cc
diff --git a/chrome/browser/ui/views/critical_notification_bubble_view.cc b/chrome/browser/ui/views/critical_notification_bubble_view.cc
index c8150c7e6f0c58deb3c28fe40e1e8efa2b2f9ce1..3c0750ae49c444fefd5a1792bddf6b37465ede9f 100644
--- a/chrome/browser/ui/views/critical_notification_bubble_view.cc
+++ b/chrome/browser/ui/views/critical_notification_bubble_view.cc
@@ -11,7 +11,7 @@
#include "chrome/browser/ui/browser_list.h"
#include "chrome/browser/upgrade_detector.h"
#include "chrome/common/pref_names.h"
-#include "content/browser/user_metrics.h"
+#include "content/public/browser/user_metrics.h"
#include "grit/chromium_strings.h"
#include "grit/generated_resources.h"
#include "grit/locale_settings.h"
@@ -26,6 +26,8 @@
#include "ui/views/layout/layout_constants.h"
#include "ui/views/widget/widget.h"
+using content::UserMetricsAction;
+
namespace {
// Layout constants.
@@ -78,7 +80,7 @@ void CriticalNotificationBubbleView::OnCountdown() {
int seconds = GetRemainingTime();
if (seconds <= 0) {
// Time's up!
- UserMetrics::RecordAction(
+ content::RecordAction(
UserMetricsAction("CriticalNotification_AutoRestart"));
refresh_timer_.Stop();
BrowserList::AttemptRestart();
@@ -97,11 +99,11 @@ void CriticalNotificationBubbleView::ButtonPressed(
UpgradeDetector::GetInstance()->acknowledge_critical_update();
if (sender == restart_button_) {
- UserMetrics::RecordAction(
+ content::RecordAction(
UserMetricsAction("CriticalNotification_Restart"));
BrowserList::AttemptRestart();
} else if (sender == dismiss_button_) {
- UserMetrics::RecordAction(UserMetricsAction("CriticalNotification_Ignore"));
+ content::RecordAction(UserMetricsAction("CriticalNotification_Ignore"));
// If the counter reaches 0, we set a restart flag that must be cleared if
// the user selects, for example, "Stay on this page" during an
// onbeforeunload handler.
@@ -196,5 +198,5 @@ void CriticalNotificationBubbleView::Init() {
base::TimeDelta::FromMilliseconds(kRefreshBubbleEvery),
this, &CriticalNotificationBubbleView::OnCountdown);
- UserMetrics::RecordAction(UserMetricsAction("CriticalNotificationShown"));
+ content::RecordAction(UserMetricsAction("CriticalNotificationShown"));
}
« no previous file with comments | « chrome/browser/ui/views/bookmarks/bookmark_menu_delegate.cc ('k') | chrome/browser/ui/views/first_run_bubble.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698