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

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

Issue 11419234: Merge 167979 - Remove PluginList::RemovePlugin() and directly remove old plug-ins from plug-in list… (Closed) Base URL: svn://svn.chromium.org/chrome/branches/1271/src/
Patch Set: Created 8 years 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 680 matching lines...) Expand 10 before | Expand all | Expand 10 after
691 if (mime_type.file_extensions[j] == extension) { 691 if (mime_type.file_extensions[j] == extension) {
692 if (actual_mime_type) 692 if (actual_mime_type)
693 *actual_mime_type = mime_type.mime_type; 693 *actual_mime_type = mime_type.mime_type;
694 return true; 694 return true;
695 } 695 }
696 } 696 }
697 } 697 }
698 return false; 698 return false;
699 } 699 }
700 700
701 /*static*/
702 bool PluginList::RemovePlugin(const FilePath& filename,
703 std::vector<webkit::WebPluginInfo>* plugins) {
704 bool did_remove = false;
705 for (size_t i = 0; i < plugins->size();) {
706 if ((*plugins)[i].path == filename) {
707 plugins->erase(plugins->begin() + i);
708 did_remove = true;
709 } else {
710 i++;
711 }
712 }
713 return did_remove;
714 }
715
716 PluginList::~PluginList() { 701 PluginList::~PluginList() {
717 } 702 }
718 703
719 704
720 } // namespace npapi 705 } // namespace npapi
721 } // namespace webkit 706 } // 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