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

Side by Side Diff: ios/chrome/browser/ui/webui/history/metrics_handler.cc

Issue 2116673002: [ios] Moved WebUI provider code to ios/web. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Self review Created 4 years, 5 months 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 unified diff | Download patch
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "ios/chrome/browser/ui/webui/history/metrics_handler.h" 5 #include "ios/chrome/browser/ui/webui/history/metrics_handler.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/bind_helpers.h" 8 #include "base/bind_helpers.h"
9 #include "base/logging.h" 9 #include "base/logging.h"
10 #include "base/metrics/histogram.h" 10 #include "base/metrics/histogram.h"
11 #include "base/metrics/user_metrics.h" 11 #include "base/metrics/user_metrics.h"
12 #include "base/strings/utf_string_conversions.h" 12 #include "base/strings/utf_string_conversions.h"
13 #include "base/values.h" 13 #include "base/values.h"
14 #include "ios/public/provider/web/web_ui_ios.h" 14 #include "ios/web/public/webui/web_ui_ios.h"
15 15
16 using base::ListValue; 16 using base::ListValue;
17 using base::UserMetricsAction; 17 using base::UserMetricsAction;
18 18
19 MetricsHandler::MetricsHandler() {} 19 MetricsHandler::MetricsHandler() {}
20 MetricsHandler::~MetricsHandler() {} 20 MetricsHandler::~MetricsHandler() {}
21 21
22 void MetricsHandler::RegisterMessages() { 22 void MetricsHandler::RegisterMessages() {
23 web_ui()->RegisterMessageCallback( 23 web_ui()->RegisterMessageCallback(
24 "metricsHandler:recordAction", 24 "metricsHandler:recordAction",
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
57 bucket_count /= 10; 57 bucket_count /= 10;
58 } 58 }
59 59
60 // As |histogram_name| may change between calls, the UMA_HISTOGRAM_ENUMERATION 60 // As |histogram_name| may change between calls, the UMA_HISTOGRAM_ENUMERATION
61 // macro cannot be used here. 61 // macro cannot be used here.
62 base::HistogramBase* counter = base::LinearHistogram::FactoryGet( 62 base::HistogramBase* counter = base::LinearHistogram::FactoryGet(
63 histogram_name, 1, int_boundary_value, bucket_count + 1, 63 histogram_name, 1, int_boundary_value, bucket_count + 1,
64 base::HistogramBase::kUmaTargetedHistogramFlag); 64 base::HistogramBase::kUmaTargetedHistogramFlag);
65 counter->Add(int_value); 65 counter->Add(int_value);
66 } 66 }
OLDNEW
« no previous file with comments | « ios/chrome/browser/ui/webui/history/metrics_handler.h ('k') | ios/chrome/browser/ui/webui/mojo_web_ui_ios_controller.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698