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

Side by Side Diff: base/metrics/user_metrics.h

Issue 1014543003: Add an IPC method for Blink to call RapporService::RecordSample() (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Changed to ETLD_PLUS_ONE Created 5 years, 9 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 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 BASE_METRICS_USER_METRICS_H_ 5 #ifndef BASE_METRICS_USER_METRICS_H_
6 #define BASE_METRICS_USER_METRICS_H_ 6 #define BASE_METRICS_USER_METRICS_H_
7 7
8 #include <string> 8 #include <string>
9 9
10 #include "base/base_export.h" 10 #include "base/base_export.h"
(...skipping 30 matching lines...) Expand all
41 // possible actions), see RecordComputedAction. 41 // possible actions), see RecordComputedAction.
42 BASE_EXPORT void RecordAction(const UserMetricsAction& action); 42 BASE_EXPORT void RecordAction(const UserMetricsAction& action);
43 43
44 // This function has identical input and behavior to RecordAction, but is 44 // This function has identical input and behavior to RecordAction, but is
45 // not automatically found by the action-processing scripts. It can be used 45 // not automatically found by the action-processing scripts. It can be used
46 // when it's a pain to enumerate all possible actions, but if you use this 46 // when it's a pain to enumerate all possible actions, but if you use this
47 // you need to also update the rules for extracting known actions in 47 // you need to also update the rules for extracting known actions in
48 // tools/metrics/actions/extract_actions.py. 48 // tools/metrics/actions/extract_actions.py.
49 BASE_EXPORT void RecordComputedAction(const std::string& action); 49 BASE_EXPORT void RecordComputedAction(const std::string& action);
50 50
51 // This function records a sample string along with the metric using RAPPOR.
52 BASE_EXPORT void RecordRappor(
53 const std::string& metric,
54 const std::string& sample);
Ilya Sherman 2015/03/25 20:51:02 RAPPOR is not a concept that current exists in bas
55
51 // Called with the action string. 56 // Called with the action string.
52 typedef base::Callback<void(const std::string&)> ActionCallback; 57 typedef base::Callback<void(const std::string&)> ActionCallback;
53 58
54 // Add/remove action callbacks (see above). 59 // Add/remove action callbacks (see above).
55 BASE_EXPORT void AddActionCallback(const ActionCallback& callback); 60 BASE_EXPORT void AddActionCallback(const ActionCallback& callback);
56 BASE_EXPORT void RemoveActionCallback(const ActionCallback& callback); 61 BASE_EXPORT void RemoveActionCallback(const ActionCallback& callback);
57 62
63 typedef base::Callback<void(
64 const std::string&,
65 const std::string&)> RapporCallback;
66
67 BASE_EXPORT void AddRapporCallback(const RapporCallback& callback);
68
58 } // namespace base 69 } // namespace base
59 70
60 #endif // BASE_METRICS_USER_METRICS_H_ 71 #endif // BASE_METRICS_USER_METRICS_H_
OLDNEW
« no previous file with comments | « no previous file | base/metrics/user_metrics.cc » ('j') | content/renderer/renderer_blink_platform_impl.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698