| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 #include "chrome/browser/plugins/plugin_info_message_filter.h" | 5 #include "chrome/browser/plugins/plugin_info_message_filter.h" |
| 6 | 6 |
| 7 #include <stddef.h> | 7 #include <stddef.h> |
| 8 | 8 |
| 9 #include <algorithm> | 9 #include <algorithm> |
| 10 #include <memory> | 10 #include <memory> |
| (...skipping 534 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 545 if (!web_contents) | 545 if (!web_contents) |
| 546 return; | 546 return; |
| 547 | 547 |
| 548 if (web_contents->GetBrowserContext()->IsOffTheRecord()) | 548 if (web_contents->GetBrowserContext()->IsOffTheRecord()) |
| 549 return; | 549 return; |
| 550 | 550 |
| 551 rappor::RapporServiceImpl* rappor_service = | 551 rappor::RapporServiceImpl* rappor_service = |
| 552 g_browser_process->rappor_service(); | 552 g_browser_process->rappor_service(); |
| 553 if (!rappor_service) | 553 if (!rappor_service) |
| 554 return; | 554 return; |
| 555 if (main_frame_origin.unique()) | 555 if (main_frame_origin.opaque()) |
| 556 return; | 556 return; |
| 557 | 557 |
| 558 if (mime_type != content::kFlashPluginSwfMimeType && | 558 if (mime_type != content::kFlashPluginSwfMimeType && |
| 559 mime_type != content::kFlashPluginSplMimeType) { | 559 mime_type != content::kFlashPluginSplMimeType) { |
| 560 return; | 560 return; |
| 561 } | 561 } |
| 562 | 562 |
| 563 rappor_service->RecordSampleString( | 563 rappor_service->RecordSampleString( |
| 564 "Plugins.FlashOriginUrl", rappor::ETLD_PLUS_ONE_RAPPOR_TYPE, | 564 "Plugins.FlashOriginUrl", rappor::ETLD_PLUS_ONE_RAPPOR_TYPE, |
| 565 net::registry_controlled_domains::GetDomainAndRegistry( | 565 net::registry_controlled_domains::GetDomainAndRegistry( |
| (...skipping 21 matching lines...) Expand all Loading... |
| 587 status == ChromeViewHostMsg_GetPluginInfo_Status::kPlayImportantContent) { | 587 status == ChromeViewHostMsg_GetPluginInfo_Status::kPlayImportantContent) { |
| 588 ChromePluginServiceFilter::GetInstance()->AuthorizePlugin( | 588 ChromePluginServiceFilter::GetInstance()->AuthorizePlugin( |
| 589 render_process_id_, path); | 589 render_process_id_, path); |
| 590 } | 590 } |
| 591 } | 591 } |
| 592 | 592 |
| 593 bool PluginInfoMessageFilter::Context::IsPluginEnabled( | 593 bool PluginInfoMessageFilter::Context::IsPluginEnabled( |
| 594 const content::WebPluginInfo& plugin) const { | 594 const content::WebPluginInfo& plugin) const { |
| 595 return plugin_prefs_->IsPluginEnabled(plugin); | 595 return plugin_prefs_->IsPluginEnabled(plugin); |
| 596 } | 596 } |
| OLD | NEW |