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

Unified Diff: chrome/renderer/plugins/chrome_plugin_placeholder.cc

Issue 1069703002: Replace the struct workaround for forward-declaring ChromeViewHostMsg_GetPluginInfo_Status with a p… (Closed) Base URL: https://chromium.googlesource.com/chromium/src@issue444203
Patch Set: update base branch Created 5 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
Index: chrome/renderer/plugins/chrome_plugin_placeholder.cc
diff --git a/chrome/renderer/plugins/chrome_plugin_placeholder.cc b/chrome/renderer/plugins/chrome_plugin_placeholder.cc
index 862627c67455f30bdaf1d69e16d838c14edac3f6..61a84baaec65ed3be8121a308cd6cf5cb8d11bde 100644
--- a/chrome/renderer/plugins/chrome_plugin_placeholder.cc
+++ b/chrome/renderer/plugins/chrome_plugin_placeholder.cc
@@ -64,7 +64,7 @@ ChromePluginPlaceholder::ChromePluginPlaceholder(
params,
html_data,
GURL(kPluginPlaceholderDataURL)),
- status_(new ChromeViewHostMsg_GetPluginInfo_Status),
+ status_(ChromeViewHostMsg_GetPluginInfo_Status::kAllowed),
title_(title),
#if defined(ENABLE_PLUGIN_INSTALLATION)
placeholder_routing_id_(MSG_ROUTING_NONE),
@@ -186,8 +186,8 @@ ChromePluginPlaceholder* ChromePluginPlaceholder::CreateBlockedPlugin(
}
void ChromePluginPlaceholder::SetStatus(
- const ChromeViewHostMsg_GetPluginInfo_Status& status) {
- status_->value = status.value;
+ ChromeViewHostMsg_GetPluginInfo_Status status) {
+ status_ = status;
}
#if defined(ENABLE_PLUGIN_INSTALLATION)
@@ -242,7 +242,7 @@ void ChromePluginPlaceholder::OnDidNotFindMissingPlugin() {
void ChromePluginPlaceholder::OnFoundMissingPlugin(
const base::string16& plugin_name) {
- if (status_->value == ChromeViewHostMsg_GetPluginInfo_Status::kNotFound)
+ if (status_ == ChromeViewHostMsg_GetPluginInfo_Status::kNotFound)
SetMessage(l10n_util::GetStringFUTF16(IDS_PLUGIN_FOUND, plugin_name));
has_host_ = true;
plugin_name_ = plugin_name;
@@ -254,7 +254,7 @@ void ChromePluginPlaceholder::OnStartedDownloadingPlugin() {
void ChromePluginPlaceholder::OnFinishedDownloadingPlugin() {
bool is_installing =
- status_->value == ChromeViewHostMsg_GetPluginInfo_Status::kNotFound;
+ status_ == ChromeViewHostMsg_GetPluginInfo_Status::kNotFound;
SetMessage(l10n_util::GetStringFUTF16(
is_installing ? IDS_PLUGIN_INSTALLING : IDS_PLUGIN_UPDATING,
plugin_name_));
@@ -287,7 +287,7 @@ void ChromePluginPlaceholder::PluginListChanged() {
document.url(),
mime_type,
&output));
- if (output.status.value == status_->value)
+ if (output.status == status_)
return;
WebPlugin* new_plugin = ChromeContentRendererClient::CreatePlugin(
render_frame(), GetFrame(), GetPluginParams(), output);
« no previous file with comments | « chrome/renderer/plugins/chrome_plugin_placeholder.h ('k') | chrome/renderer/plugins/shadow_dom_plugin_placeholder.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698