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

Unified Diff: content/utility/utility_thread_impl.cc

Issue 9874001: revert 128949 (and dependent 129252) (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 9 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
« no previous file with comments | « chrome/browser/ui/webui/plugins_ui.cc ('k') | webkit/plugins/npapi/plugin_group.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/utility/utility_thread_impl.cc
diff --git a/content/utility/utility_thread_impl.cc b/content/utility/utility_thread_impl.cc
index f1f7cc88221dd0f7698b66493dc5389019c8a6b8..ccd3f7daa3d5403f52cd558604f865fbc514438f 100644
--- a/content/utility/utility_thread_impl.cc
+++ b/content/utility/utility_thread_impl.cc
@@ -1,4 +1,4 @@
-// Copyright (c) 2012 The Chromium Authors. All rights reserved.
+// Copyright (c) 2011 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
@@ -143,16 +143,19 @@ void UtilityThreadImpl::OnLoadPlugins(
}
#endif
- ScopedVector<webkit::npapi::PluginGroup> plugin_groups;
- // TODO(bauerb): If we restart loading plug-ins, we might mess up the logic in
- // PluginList::ShouldLoadPlugin due to missing the previously loaded plug-ins
- // in |plugin_groups|.
for (size_t i = 0; i < plugin_paths.size(); ++i) {
- webkit::WebPluginInfo plugin;
- if (!plugin_list->LoadPlugin(plugin_paths[i], &plugin_groups, &plugin))
+ ScopedVector<webkit::npapi::PluginGroup> plugin_groups;
+ plugin_list->LoadPlugin(plugin_paths[i], &plugin_groups);
+
+ if (plugin_groups.empty()) {
Send(new UtilityHostMsg_LoadPluginFailed(i, plugin_paths[i]));
- else
- Send(new UtilityHostMsg_LoadedPlugin(i, plugin));
+ continue;
+ }
+
+ const webkit::npapi::PluginGroup* group = plugin_groups[0];
+ DCHECK_EQ(group->web_plugin_infos().size(), 1u);
+
+ Send(new UtilityHostMsg_LoadedPlugin(i, group->web_plugin_infos().front()));
}
ReleaseProcessIfNeeded();
« no previous file with comments | « chrome/browser/ui/webui/plugins_ui.cc ('k') | webkit/plugins/npapi/plugin_group.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698