| 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 505 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 516 output->group_name = plugin_metadata->name(); | 516 output->group_name = plugin_metadata->name(); |
| 517 } | 517 } |
| 518 | 518 |
| 519 context_.MaybeGrantAccess(output->status, output->plugin.path); | 519 context_.MaybeGrantAccess(output->status, output->plugin.path); |
| 520 | 520 |
| 521 ChromeViewHostMsg_GetPluginInfo::WriteReplyParams(reply_msg, *output); | 521 ChromeViewHostMsg_GetPluginInfo::WriteReplyParams(reply_msg, *output); |
| 522 Send(reply_msg); | 522 Send(reply_msg); |
| 523 if (output->status != ChromeViewHostMsg_GetPluginInfo_Status::kNotFound) { | 523 if (output->status != ChromeViewHostMsg_GetPluginInfo_Status::kNotFound) { |
| 524 main_thread_task_runner_->PostTask( | 524 main_thread_task_runner_->PostTask( |
| 525 FROM_HERE, | 525 FROM_HERE, |
| 526 base::Bind(&PluginInfoMessageFilter::ReportMetrics, this, | 526 base::BindOnce(&PluginInfoMessageFilter::ReportMetrics, this, |
| 527 params.render_frame_id, output->actual_mime_type, params.url, | 527 params.render_frame_id, output->actual_mime_type, |
| 528 params.main_frame_origin, ukm_source_id_)); | 528 params.url, params.main_frame_origin, ukm_source_id_)); |
| 529 } | 529 } |
| 530 } | 530 } |
| 531 | 531 |
| 532 void PluginInfoMessageFilter::ReportMetrics( | 532 void PluginInfoMessageFilter::ReportMetrics( |
| 533 int render_frame_id, | 533 int render_frame_id, |
| 534 const base::StringPiece& mime_type, | 534 const base::StringPiece& mime_type, |
| 535 const GURL& url, | 535 const GURL& url, |
| 536 const url::Origin& main_frame_origin, | 536 const url::Origin& main_frame_origin, |
| 537 int32_t ukm_source_id) { | 537 int32_t ukm_source_id) { |
| 538 DCHECK_CURRENTLY_ON(content::BrowserThread::UI); | 538 DCHECK_CURRENTLY_ON(content::BrowserThread::UI); |
| (...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after 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 |