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

Unified Diff: chrome/browser/plugins/plugin_info_message_filter.h

Issue 2768263003: Plugins: Add UKM Metrics to Flash loads (Closed)
Patch Set: merge Created 3 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | chrome/browser/plugins/plugin_info_message_filter.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/plugins/plugin_info_message_filter.h
diff --git a/chrome/browser/plugins/plugin_info_message_filter.h b/chrome/browser/plugins/plugin_info_message_filter.h
index 547a75e5f2e0b134c623fefac307ba75bb9ea627..56efa4c4ded91030e13a4c8ef750d9dfc9608de6 100644
--- a/chrome/browser/plugins/plugin_info_message_filter.h
+++ b/chrome/browser/plugins/plugin_info_message_filter.h
@@ -13,6 +13,7 @@
#include "base/macros.h"
#include "base/memory/ref_counted.h"
#include "base/sequenced_task_runner_helpers.h"
+#include "base/strings/string_piece.h"
#include "chrome/browser/plugins/plugin_metadata.h"
#include "chrome/browser/plugins/plugin_prefs.h"
#include "components/content_settings/core/common/content_settings.h"
@@ -61,6 +62,8 @@ class PluginInfoMessageFilter : public content::BrowserMessageFilter {
~Context();
+ int render_process_id() { return render_process_id_; }
+
void DecidePluginStatus(
const GURL& url,
const url::Origin& main_frame_origin,
@@ -149,12 +152,22 @@ class PluginInfoMessageFilter : public content::BrowserMessageFilter {
std::vector<base::string16>* additional_param_values);
#endif
+ // Reports usage metrics to RAPPOR and UKM. This must be a class function,
+ // because UkmService requires a friend declaration by design to call.
+ void ReportMetrics(int render_frame_id,
+ const base::StringPiece& mime_type,
+ const GURL& url,
+ const url::Origin& main_frame_origin,
+ int32_t ukm_source_id);
+
Context context_;
std::unique_ptr<KeyedServiceShutdownNotifier::Subscription>
shutdown_notifier_;
scoped_refptr<base::SingleThreadTaskRunner> main_thread_task_runner_;
+ const int32_t ukm_source_id_;
+
DISALLOW_COPY_AND_ASSIGN(PluginInfoMessageFilter);
};
« no previous file with comments | « no previous file | chrome/browser/plugins/plugin_info_message_filter.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698