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

Unified Diff: content/child/npapi/webplugin_delegate_impl_win.cc

Issue 557893003: Stop using an atom to store plugin name/version on Windows. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 3 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 | « content/browser/plugin_service_impl.cc ('k') | content/common/plugin_constants_win.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/child/npapi/webplugin_delegate_impl_win.cc
diff --git a/content/child/npapi/webplugin_delegate_impl_win.cc b/content/child/npapi/webplugin_delegate_impl_win.cc
index 7781c5a5ed89d439d090aa38c9fc8231f726c944..40f2251a28cb94cd40e1916a7486436d8b02a213 100644
--- a/content/child/npapi/webplugin_delegate_impl_win.cc
+++ b/content/child/npapi/webplugin_delegate_impl_win.cc
@@ -499,35 +499,6 @@ bool WebPluginDelegateImpl::WindowedCreatePlugin() {
BOOL result = SetProp(windowed_handle_, kWebPluginDelegateProperty, this);
DCHECK(result == TRUE) << "SetProp failed, last error = " << GetLastError();
- // Get the name and version of the plugin, create atoms and set them in a
- // window property. Use atoms so that other processes can access the name and
- // version of the plugin that this window is hosting.
- if (instance_ != NULL) {
- PluginLib* plugin_lib = instance()->plugin_lib();
- if (plugin_lib != NULL) {
- std::wstring plugin_name = plugin_lib->plugin_info().name;
- if (!plugin_name.empty()) {
- ATOM plugin_name_atom = GlobalAddAtomW(plugin_name.c_str());
- DCHECK_NE(0, plugin_name_atom) << " last error = " <<
- GetLastError();
- result = SetProp(windowed_handle_,
- kPluginNameAtomProperty,
- reinterpret_cast<HANDLE>(plugin_name_atom));
- DCHECK(result == TRUE) << "SetProp failed, last error = " <<
- GetLastError();
- }
- base::string16 plugin_version = plugin_lib->plugin_info().version;
- if (!plugin_version.empty()) {
- ATOM plugin_version_atom = GlobalAddAtomW(plugin_version.c_str());
- DCHECK_NE(0, plugin_version_atom);
- result = SetProp(windowed_handle_,
- kPluginVersionAtomProperty,
- reinterpret_cast<HANDLE>(plugin_version_atom));
- DCHECK(result == TRUE) << "SetProp failed, last error = " <<
- GetLastError();
- }
- }
- }
// Calling SetWindowLongPtrA here makes the window proc ASCII, which is
// required by at least the Shockwave Director plug-in.
@@ -1027,14 +998,6 @@ LRESULT CALLBACK WebPluginDelegateImpl::NativeWndProc(
if (message == WM_NCDESTROY) {
RemoveProp(hwnd, kWebPluginDelegateProperty);
- ATOM plugin_name_atom = reinterpret_cast<ATOM>(
- RemoveProp(hwnd, kPluginNameAtomProperty));
- if (plugin_name_atom != 0)
- GlobalDeleteAtom(plugin_name_atom);
- ATOM plugin_version_atom = reinterpret_cast<ATOM>(
- RemoveProp(hwnd, kPluginVersionAtomProperty));
- if (plugin_version_atom != 0)
- GlobalDeleteAtom(plugin_version_atom);
ClearThrottleQueueForWindow(hwnd);
}
}
« no previous file with comments | « content/browser/plugin_service_impl.cc ('k') | content/common/plugin_constants_win.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698