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

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

Issue 11316101: Merge 167979 - Remove PluginList::RemovePlugin() and directly remove old plug-ins from plug-in list… (Closed) Base URL: svn://svn.chromium.org/chrome/branches/1312/src/
Patch Set: Created 8 years, 1 month 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_list.h ('k') | webkit/plugins/npapi/plugin_list_win.cc » ('j') | 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/plugin_list.h" 5 #include "webkit/plugins/npapi/plugin_list.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 8
9 #include "base/command_line.h" 9 #include "base/command_line.h"
10 #include "base/lazy_instance.h" 10 #include "base/lazy_instance.h"
(...skipping 434 matching lines...) Expand 10 before | Expand all | Expand 10 after
445 if (mime_type.file_extensions[j] == extension) { 445 if (mime_type.file_extensions[j] == extension) {
446 if (actual_mime_type) 446 if (actual_mime_type)
447 *actual_mime_type = mime_type.mime_type; 447 *actual_mime_type = mime_type.mime_type;
448 return true; 448 return true;
449 } 449 }
450 } 450 }
451 } 451 }
452 return false; 452 return false;
453 } 453 }
454 454
455 /*static*/
456 bool PluginList::RemovePlugin(const FilePath& filename,
457 std::vector<webkit::WebPluginInfo>* plugins) {
458 bool did_remove = false;
459 for (size_t i = 0; i < plugins->size();) {
460 if ((*plugins)[i].path == filename) {
461 plugins->erase(plugins->begin() + i);
462 did_remove = true;
463 } else {
464 i++;
465 }
466 }
467 return did_remove;
468 }
469
470 PluginList::~PluginList() { 455 PluginList::~PluginList() {
471 } 456 }
472 457
473 458
474 } // namespace npapi 459 } // namespace npapi
475 } // namespace webkit 460 } // namespace webkit
OLDNEW
« no previous file with comments | « webkit/plugins/npapi/plugin_list.h ('k') | webkit/plugins/npapi/plugin_list_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698