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

Unified Diff: content/renderer/pepper/pepper_plugin_instance_impl.cc

Issue 687273004: Measure the number of frame loads with Flash. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: address comments, add more actions Created 6 years, 2 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
Index: content/renderer/pepper/pepper_plugin_instance_impl.cc
diff --git a/content/renderer/pepper/pepper_plugin_instance_impl.cc b/content/renderer/pepper/pepper_plugin_instance_impl.cc
index e22101ba7c5f8660dd9d5d8a401b6c1139100266..6a63bb8327f131d7ad624db26dc1bc4956c90999 100644
--- a/content/renderer/pepper/pepper_plugin_instance_impl.cc
+++ b/content/renderer/pepper/pepper_plugin_instance_impl.cc
@@ -388,6 +388,10 @@ void InitLatencyInfo(ui::LatencyInfo* new_latency,
}
}
+bool IsFlashPlugin(PluginModule* module) {
+ return module->name() == kFlashPluginName;
+}
+
} // namespace
// static
@@ -592,6 +596,11 @@ PepperPluginInstanceImpl::PepperPluginInstanceImpl(
base::Bind(&PepperPluginInstanceImpl::SetPluginThrottled,
weak_factory_.GetWeakPtr(), true /* throttled */)));
}
+
+ if (IsFlashPlugin(module_.get())) {
+ RenderThread::Get()->RecordAction(
+ base::UserMetricsAction("Flash.PluginInstanceCreated"));
+ }
}
PepperPluginInstanceImpl::~PepperPluginInstanceImpl() {
@@ -3296,7 +3305,7 @@ void PepperPluginInstanceImpl::DidDataFromWebURLResponse(
}
bool PepperPluginInstanceImpl::IsPeripheralContent() const {
- if (module_->name() != kFlashPluginName)
+ if (!IsFlashPlugin(module_.get()))
return false;
// Peripheral plugin content is defined to be peripheral when the plugin

Powered by Google App Engine
This is Rietveld 408576698