Chromium Code Reviews| Index: chrome/browser/plugins/plugin_info_message_filter.cc |
| diff --git a/chrome/browser/plugins/plugin_info_message_filter.cc b/chrome/browser/plugins/plugin_info_message_filter.cc |
| index 1d61fab50f78ac1a152f7fa75742f69d4006686e..9cbdc850542a3e0e7a7e6b7aadc99dabc00fbf15 100644 |
| --- a/chrome/browser/plugins/plugin_info_message_filter.cc |
| +++ b/chrome/browser/plugins/plugin_info_message_filter.cc |
| @@ -42,6 +42,7 @@ |
| #include "content/public/common/content_constants.h" |
| #include "net/base/registry_controlled_domains/registry_controlled_domain.h" |
| #include "url/gurl.h" |
| +#include "url/origin.h" |
| #include "widevine_cdm_version.h" // In SHARED_INTERMEDIATE_DIR. |
| #if defined(ENABLE_EXTENSIONS) |
| @@ -89,7 +90,7 @@ static void SendPluginAvailabilityUMA(const std::string& mime_type, |
| // RAPPOR service. |
| void ReportMetrics(const std::string& mime_type, |
| const GURL& url, |
| - const GURL& origin_url) { |
| + const url::Origin& top_origin) { |
| DCHECK_CURRENTLY_ON(content::BrowserThread::UI); |
| if (chrome::IsIncognitoSessionActive()) |
| @@ -97,13 +98,15 @@ void ReportMetrics(const std::string& mime_type, |
| rappor::RapporService* rappor_service = g_browser_process->rappor_service(); |
| if (!rappor_service) |
| return; |
| + if (top_origin.unique()) |
| + return; |
| if (mime_type == content::kFlashPluginSwfMimeType || |
| mime_type == content::kFlashPluginSplMimeType) { |
| rappor_service->RecordSample( |
| "Plugins.FlashOriginUrl", rappor::ETLD_PLUS_ONE_RAPPOR_TYPE, |
| net::registry_controlled_domains::GetDomainAndRegistry( |
| - origin_url, |
| + GURL(top_origin.Serialize()), |
| net::registry_controlled_domains::INCLUDE_PRIVATE_REGISTRIES)); |
| rappor_service->RecordSample( |
| "Plugins.FlashUrl", rappor::ETLD_PLUS_ONE_RAPPOR_TYPE, |
| @@ -207,16 +210,15 @@ PluginInfoMessageFilter::~PluginInfoMessageFilter() {} |
| struct PluginInfoMessageFilter::GetPluginInfo_Params { |
| int render_frame_id; |
| GURL url; |
| - GURL top_origin_url; |
| + url::Origin top_origin_url; |
|
nasko
2016/09/30 20:38:48
This variable is no longer an URL.
tommycli
2016/09/30 21:20:41
Done.
|
| std::string mime_type; |
| }; |
| -void PluginInfoMessageFilter::OnGetPluginInfo( |
| - int render_frame_id, |
| - const GURL& url, |
| - const GURL& top_origin_url, |
| - const std::string& mime_type, |
| - IPC::Message* reply_msg) { |
| +void PluginInfoMessageFilter::OnGetPluginInfo(int render_frame_id, |
| + const GURL& url, |
| + const url::Origin& top_origin_url, |
|
nasko
2016/09/30 20:38:48
Not an URL
tommycli
2016/09/30 21:20:41
Done.
|
| + const std::string& mime_type, |
| + IPC::Message* reply_msg) { |
| GetPluginInfo_Params params = { |
| render_frame_id, |
| url, |
| @@ -397,7 +399,7 @@ void PluginInfoMessageFilter::Context::DecidePluginStatus( |
| bool PluginInfoMessageFilter::Context::FindEnabledPlugin( |
| int render_frame_id, |
| const GURL& url, |
| - const GURL& top_origin_url, |
| + const url::Origin& top_origin_url, |
| const std::string& mime_type, |
| ChromeViewHostMsg_GetPluginInfo_Status* status, |
| WebPluginInfo* plugin, |