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

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

Issue 10797017: base: Make ScopedVector::clear() destroy elements. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: update location_bar_view_mac.mm 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 | « ui/views/widget/native_widget_win.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/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 404 matching lines...) Expand 10 before | Expand all | Expand 10 after
415 const std::vector<PluginGroup*>& PluginList::GetHardcodedPluginGroups() const { 415 const std::vector<PluginGroup*>& PluginList::GetHardcodedPluginGroups() const {
416 return hardcoded_plugin_groups_.get(); 416 return hardcoded_plugin_groups_.get();
417 } 417 }
418 418
419 void PluginList::SetPlugins(const std::vector<webkit::WebPluginInfo>& plugins) { 419 void PluginList::SetPlugins(const std::vector<webkit::WebPluginInfo>& plugins) {
420 base::AutoLock lock(lock_); 420 base::AutoLock lock(lock_);
421 421
422 DCHECK_NE(LOADING_STATE_REFRESHING, loading_state_); 422 DCHECK_NE(LOADING_STATE_REFRESHING, loading_state_);
423 loading_state_ = LOADING_STATE_UP_TO_DATE; 423 loading_state_ = LOADING_STATE_UP_TO_DATE;
424 424
425 plugin_groups_.reset(); 425 plugin_groups_.clear();
426 for (std::vector<webkit::WebPluginInfo>::const_iterator it = plugins.begin(); 426 for (std::vector<webkit::WebPluginInfo>::const_iterator it = plugins.begin();
427 it != plugins.end(); 427 it != plugins.end();
428 ++it) { 428 ++it) {
429 AddToPluginGroups(*it, &plugin_groups_); 429 AddToPluginGroups(*it, &plugin_groups_);
430 } 430 }
431 } 431 }
432 432
433 void PluginList::set_will_load_plugins_callback(const base::Closure& callback) { 433 void PluginList::set_will_load_plugins_callback(const base::Closure& callback) {
434 base::AutoLock lock(lock_); 434 base::AutoLock lock(lock_);
435 will_load_plugins_callback_ = callback; 435 will_load_plugins_callback_ = callback;
(...skipping 194 matching lines...) Expand 10 before | Expand all | Expand 10 after
630 } 630 }
631 return false; 631 return false;
632 } 632 }
633 633
634 PluginList::~PluginList() { 634 PluginList::~PluginList() {
635 } 635 }
636 636
637 637
638 } // namespace npapi 638 } // namespace npapi
639 } // namespace webkit 639 } // namespace webkit
OLDNEW
« no previous file with comments | « ui/views/widget/native_widget_win.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698