Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | |
| 2 // Use of this source code is governed by a BSD-style license that can be | |
| 3 // found in the LICENSE file. | |
| 4 | |
| 5 #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.
| |
| 6 | |
| 7 #include "base/metrics/histogram.h" | |
| 8 | |
| 9 // 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.
| |
| 10 const char JumplistMetrics::kMostVisitedCategory[] = "most-visited"; | |
| 11 const char JumplistMetrics::kProfilesCategory[] = "profiles"; | |
| 12 const char JumplistMetrics::kRecentlyClosedCategory[] = "recently-closed"; | |
| 13 | |
| 14 void JumplistMetrics::LogJumplistActionFromSwitchValue( | |
| 15 const std::string& value) { | |
| 16 JumplistCategory metric = CATEGORY_UNKNOWN; | |
| 17 if (value == kMostVisitedCategory) | |
| 18 metric = MOST_VISITED_URL; | |
| 19 else if (value == kProfilesCategory) | |
| 20 metric = SWITCH_TO_PROFILE; | |
| 21 else if (value == kRecentlyClosedCategory) | |
| 22 metric = RECENTLY_CLOSED_URL; | |
| 23 DCHECK_NE(metric, CATEGORY_UNKNOWN); | |
| 24 | |
| 25 UMA_HISTOGRAM_ENUMERATION( | |
| 26 "WinJumplist.Action", metric, NUM_JUMPLIST_CATEGORY_METRICS); | |
| 27 } | |
| OLD | NEW |