| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 "chrome/browser/ui/webui/metrics_handler.h" | 5 #include "chrome/browser/ui/webui/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" |
| (...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 109 } else { | 109 } else { |
| 110 NOTREACHED(); | 110 NOTREACHED(); |
| 111 } | 111 } |
| 112 content::NotificationService::current()->Notify( | 112 content::NotificationService::current()->Notify( |
| 113 chrome::NOTIFICATION_METRIC_EVENT_DURATION, | 113 chrome::NOTIFICATION_METRIC_EVENT_DURATION, |
| 114 content::Source<WebContents>(tab), | 114 content::Source<WebContents>(tab), |
| 115 content::Details<MetricEventDurationDetails>(&details)); | 115 content::Details<MetricEventDurationDetails>(&details)); |
| 116 } | 116 } |
| 117 | 117 |
| 118 void MetricsHandler::HandleLogMouseover(const base::ListValue* args) { | 118 void MetricsHandler::HandleLogMouseover(const base::ListValue* args) { |
| 119 #if !defined(OS_ANDROID) |
| 120 // Android uses native UI for NTP. |
| 119 NTPUserDataLogger::GetOrCreateFromWebContents( | 121 NTPUserDataLogger::GetOrCreateFromWebContents( |
| 120 web_ui()->GetWebContents())->LogEvent(NTP_MOUSEOVER); | 122 web_ui()->GetWebContents())->LogEvent(NTP_MOUSEOVER); |
| 123 #endif // !defined(OS_ANDROID) |
| 121 } | 124 } |
| OLD | NEW |