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

Unified Diff: chrome/browser/jumplist_metrics.cc

Issue 660813002: [Win] Add a fast profile switcher to the Windows taskbar item. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix compile Created 6 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
Index: chrome/browser/jumplist_metrics.cc
diff --git a/chrome/browser/jumplist_metrics.cc b/chrome/browser/jumplist_metrics.cc
new file mode 100644
index 0000000000000000000000000000000000000000..e509d9d4173dd61d4f5aa7d213f771f40914f296
--- /dev/null
+++ b/chrome/browser/jumplist_metrics.cc
@@ -0,0 +1,27 @@
+// Copyright 2014 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#include "chrome/browser/jumplist_metrics.h"
tapted 2014/11/10 23:47:41 Name this .cc file (and header) jumplist_metrics_w
noms (inactive) 2014/11/12 19:04:11 Done.
+
+#include "base/metrics/histogram.h"
+
+// static
tapted 2014/11/10 23:47:41 nit: usually this just goes before static member f
noms (inactive) 2014/11/12 19:04:11 Done.
+const char JumplistMetrics::kMostVisitedCategory[] = "most-visited";
+const char JumplistMetrics::kProfilesCategory[] = "profiles";
+const char JumplistMetrics::kRecentlyClosedCategory[] = "recently-closed";
+
+void JumplistMetrics::LogJumplistActionFromSwitchValue(
+ const std::string& value) {
+ JumplistCategory metric = CATEGORY_UNKNOWN;
+ if (value == kMostVisitedCategory)
+ metric = MOST_VISITED_URL;
+ else if (value == kProfilesCategory)
+ metric = SWITCH_TO_PROFILE;
+ else if (value == kRecentlyClosedCategory)
+ metric = RECENTLY_CLOSED_URL;
+ DCHECK_NE(metric, CATEGORY_UNKNOWN);
+
+ UMA_HISTOGRAM_ENUMERATION(
+ "WinJumplist.Action", metric, NUM_JUMPLIST_CATEGORY_METRICS);
+}

Powered by Google App Engine
This is Rietveld 408576698