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

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

Issue 2798643002: Plugins: Add UKM Metrics to Flash loads (Closed)
Patch Set: Created 3 years, 8 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 67a851f5db54bd3c7af6d0dba6a2df4b4e7aa34e..7cffe9a3fbb69514b33f0e79d6789c07df30d215 100644
--- a/chrome/browser/plugins/plugin_info_message_filter.h
+++ b/chrome/browser/plugins/plugin_info_message_filter.h
@@ -14,6 +14,7 @@
#include "base/memory/ref_counted.h"
#include "base/memory/weak_ptr.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"
@@ -62,6 +63,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,
@@ -150,11 +153,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_;
+
base::WeakPtrFactory<PluginInfoMessageFilter> weak_ptr_factory_;
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