Componentize HistoryURLProvider/ScoredHistoryMatch.
[chromium-blink-merge.git] / chrome / browser / metrics / jumplist_metrics_win.cc
blobfd91812377f764cc7799034cb1b9f3aa98581537
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.
5 #include "chrome/browser/metrics/jumplist_metrics_win.h"
7 #include "base/metrics/histogram.h"
9 namespace jumplist {
11 const char kMostVisitedCategory[] = "most-visited";
12 const char kRecentlyClosedCategory[] = "recently-closed";
14 void LogJumplistActionFromSwitchValue(const std::string& value) {
15 JumplistCategory metric = CATEGORY_UNKNOWN;
16 if (value == kMostVisitedCategory)
17 metric = MOST_VISITED_URL;
18 else if (value == kRecentlyClosedCategory)
19 metric = RECENTLY_CLOSED_URL;
20 DCHECK_NE(metric, CATEGORY_UNKNOWN);
22 UMA_HISTOGRAM_ENUMERATION(
23 "WinJumplist.Action", metric, NUM_JUMPLIST_CATEGORY_METRICS);
26 } // namespace jumplist