| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 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 | 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 #ifndef IOS_WEB_PUBLIC_USER_METRICS_H_ | 5 #ifndef IOS_WEB_PUBLIC_USER_METRICS_H_ |
| 6 #define IOS_WEB_PUBLIC_USER_METRICS_H_ | 6 #define IOS_WEB_PUBLIC_USER_METRICS_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 | 9 |
| 10 #include "base/callback.h" | 10 #include "base/callback.h" |
| 11 | 11 |
| 12 namespace base { | 12 namespace base { |
| 13 struct UserMetricsAction; | 13 struct UserMetricsAction; |
| 14 } // namespace base | 14 } // namespace base |
| 15 | 15 |
| 16 namespace web { | 16 namespace web { |
| 17 | 17 |
| 18 // Wrappers around functions defined in base/metrics/user_metrics.h, refer to | 18 // Wrappers around functions defined in base/metrics/user_metrics.h, refer to |
| 19 // that header for full documentation. These wrappers can be called from any | 19 // that header for full documentation. These wrappers can be called from any |
| 20 // thread (they will post back to the UI thread to do the recording). | 20 // thread (they will post back to the UI thread to do the recording). |
| 21 | 21 |
| 22 void RecordAction(const base::UserMetricsAction& action); | 22 void RecordAction(const base::UserMetricsAction& action); |
| 23 void RecordComputedAction(const std::string& action); | 23 void RecordComputedAction(const std::string& action); |
| 24 void RecordRappor(const std::string& metric, const std::string& sample); |
| 24 | 25 |
| 25 } // namespace web | 26 } // namespace web |
| 26 | 27 |
| 27 #endif // IOS_WEB_PUBLIC_USER_METRICS_H_ | 28 #endif // IOS_WEB_PUBLIC_USER_METRICS_H_ |
| OLD | NEW |