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

Side by Side Diff: webkit/plugins/npapi/webplugin_delegate_impl_win.cc

Issue 10683005: Remove two deprecated methods from base::Version (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: ... Created 8 years, 5 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « webkit/plugins/npapi/plugin_group_unittest.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 "webkit/plugins/npapi/webplugin_delegate_impl.h" 5 #include "webkit/plugins/npapi/webplugin_delegate_impl.h"
6 6
7 #include <map> 7 #include <map>
8 #include <string> 8 #include <string>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 237 matching lines...) Expand 10 before | Expand all | Expand 10 after
248 result = func(key, KeyNameInformation, buffer.get(), size, &size); 248 result = func(key, KeyNameInformation, buffer.get(), size, &size);
249 if (result != STATUS_SUCCESS) 249 if (result != STATUS_SUCCESS)
250 return L""; 250 return L"";
251 251
252 KEY_NAME_INFORMATION* info = 252 KEY_NAME_INFORMATION* info =
253 reinterpret_cast<KEY_NAME_INFORMATION*>(buffer.get()); 253 reinterpret_cast<KEY_NAME_INFORMATION*>(buffer.get());
254 return std::wstring(info->Name, info->NameLength / sizeof(wchar_t)); 254 return std::wstring(info->Name, info->NameLength / sizeof(wchar_t));
255 } 255 }
256 256
257 int GetPluginMajorVersion(const WebPluginInfo& plugin_info) { 257 int GetPluginMajorVersion(const WebPluginInfo& plugin_info) {
258 scoped_ptr<Version> plugin_version(PluginGroup::CreateVersionFromString( 258 Version plugin_version;
259 plugin_info.version)); 259 PluginGroup::CreateVersionFromString(plugin_info.version, &plugin_version);
260
260 int major_version = 0; 261 int major_version = 0;
261 if (plugin_version.get()) { 262 if (plugin_version.IsValid())
262 major_version = plugin_version->components()[0]; 263 major_version = plugin_version.components()[0];
263 } 264
264 return major_version; 265 return major_version;
265 } 266 }
266 267
267 bool GetPluginPropertyFromWindow( 268 bool GetPluginPropertyFromWindow(
268 HWND window, const wchar_t* plugin_atom_property, 269 HWND window, const wchar_t* plugin_atom_property,
269 string16* plugin_property) { 270 string16* plugin_property) {
270 ATOM plugin_atom = reinterpret_cast<ATOM>( 271 ATOM plugin_atom = reinterpret_cast<ATOM>(
271 GetPropW(window, plugin_atom_property)); 272 GetPropW(window, plugin_atom_property));
272 if (plugin_atom != 0) { 273 if (plugin_atom != 0) {
273 WCHAR plugin_property_local[MAX_PATH] = {0}; 274 WCHAR plugin_property_local[MAX_PATH] = {0};
(...skipping 1423 matching lines...) Expand 10 before | Expand all | Expand 10 after
1697 ::ReleaseCapture(); 1698 ::ReleaseCapture();
1698 break; 1699 break;
1699 1700
1700 default: 1701 default:
1701 break; 1702 break;
1702 } 1703 }
1703 } 1704 }
1704 1705
1705 } // namespace npapi 1706 } // namespace npapi
1706 } // namespace webkit 1707 } // namespace webkit
OLDNEW
« no previous file with comments | « webkit/plugins/npapi/plugin_group_unittest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698