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

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

Issue 6246036: FilePath: Remove most of ToWStringHack, adding a LossyDisplayName() (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: bug link Created 9 years, 10 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 | « views/drag_utils.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) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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/plugin_list.h" 5 #include "webkit/plugins/npapi/plugin_list.h"
6 6
7 #include <tchar.h> 7 #include <tchar.h>
8 8
9 #include <set> 9 #include <set>
10 10
(...skipping 325 matching lines...) Expand 10 before | Expand all | Expand 10 after
336 336
337 bool PluginList::ShouldLoadPlugin(const WebPluginInfo& info, 337 bool PluginList::ShouldLoadPlugin(const WebPluginInfo& info,
338 ScopedVector<PluginGroup>* plugin_groups) { 338 ScopedVector<PluginGroup>* plugin_groups) {
339 // Version check 339 // Version check
340 340
341 for (size_t i = 0; i < plugin_groups->size(); ++i) { 341 for (size_t i = 0; i < plugin_groups->size(); ++i) {
342 const std::vector<WebPluginInfo>& plugins = 342 const std::vector<WebPluginInfo>& plugins =
343 (*plugin_groups)[i]->web_plugins_info(); 343 (*plugin_groups)[i]->web_plugins_info();
344 for (size_t j = 0; j < plugins.size(); ++j) { 344 for (size_t j = 0; j < plugins.size(); ++j) {
345 std::wstring plugin1 = 345 std::wstring plugin1 =
346 StringToLowerASCII(plugins[j].path.BaseName().ToWStringHack()); 346 StringToLowerASCII(plugins[j].path.BaseName().value());
347 std::wstring plugin2 = 347 std::wstring plugin2 =
348 StringToLowerASCII(info.path.BaseName().ToWStringHack()); 348 StringToLowerASCII(info.path.BaseName().value());
349 if ((plugin1 == plugin2 && HaveSharedMimeType(plugins[j], info)) || 349 if ((plugin1 == plugin2 && HaveSharedMimeType(plugins[j], info)) ||
350 (plugin1 == kJavaDeploy1 && plugin2 == kJavaDeploy2) || 350 (plugin1 == kJavaDeploy1 && plugin2 == kJavaDeploy2) ||
351 (plugin1 == kJavaDeploy2 && plugin2 == kJavaDeploy1)) { 351 (plugin1 == kJavaDeploy2 && plugin2 == kJavaDeploy1)) {
352 if (!IsNewerVersion(plugins[j].version, info.version)) 352 if (!IsNewerVersion(plugins[j].version, info.version))
353 return false; // We have loaded a plugin whose version is newer. 353 return false; // We have loaded a plugin whose version is newer.
354 354
355 (*plugin_groups)[i]->RemovePlugin(plugins[j].path); 355 (*plugin_groups)[i]->RemovePlugin(plugins[j].path);
356 break; 356 break;
357 } 357 }
358 } 358 }
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after
419 return false; 419 return false;
420 } 420 }
421 } 421 }
422 } 422 }
423 423
424 return true; 424 return true;
425 } 425 }
426 426
427 } // namespace npapi 427 } // namespace npapi
428 } // namespace webkit 428 } // namespace webkit
OLDNEW
« no previous file with comments | « views/drag_utils.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698