| OLD | NEW |
| 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 "content/common/plugin_list.h" | 5 #include "content/common/plugin_list.h" |
| 6 | 6 |
| 7 #include <stddef.h> | 7 #include <stddef.h> |
| 8 | 8 |
| 9 #include <algorithm> | 9 #include <algorithm> |
| 10 | 10 |
| (...skipping 154 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 165 continue; | 165 continue; |
| 166 } | 166 } |
| 167 plugin_paths->push_back(path); | 167 plugin_paths->push_back(path); |
| 168 } | 168 } |
| 169 } | 169 } |
| 170 | 170 |
| 171 void PluginList::SetPlugins(const std::vector<WebPluginInfo>& plugins) { | 171 void PluginList::SetPlugins(const std::vector<WebPluginInfo>& plugins) { |
| 172 base::AutoLock lock(lock_); | 172 base::AutoLock lock(lock_); |
| 173 | 173 |
| 174 // If we haven't been invalidated in the mean time, mark the plugin list as | 174 // If we haven't been invalidated in the mean time, mark the plugin list as |
| 175 // up-to-date. | 175 // up to date. |
| 176 if (loading_state_ != LOADING_STATE_NEEDS_REFRESH) | 176 if (loading_state_ != LOADING_STATE_NEEDS_REFRESH) |
| 177 loading_state_ = LOADING_STATE_UP_TO_DATE; | 177 loading_state_ = LOADING_STATE_UP_TO_DATE; |
| 178 | 178 |
| 179 plugins_list_ = plugins; | 179 plugins_list_ = plugins; |
| 180 } | 180 } |
| 181 | 181 |
| 182 void PluginList::set_will_load_plugins_callback(const base::Closure& callback) { | 182 void PluginList::set_will_load_plugins_callback(const base::Closure& callback) { |
| 183 base::AutoLock lock(lock_); | 183 base::AutoLock lock(lock_); |
| 184 will_load_plugins_callback_ = callback; | 184 will_load_plugins_callback_ = callback; |
| 185 } | 185 } |
| (...skipping 111 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 297 plugin_path); | 297 plugin_path); |
| 298 if (it != extra_plugin_paths_.end()) | 298 if (it != extra_plugin_paths_.end()) |
| 299 extra_plugin_paths_.erase(it); | 299 extra_plugin_paths_.erase(it); |
| 300 } | 300 } |
| 301 | 301 |
| 302 PluginList::~PluginList() { | 302 PluginList::~PluginList() { |
| 303 } | 303 } |
| 304 | 304 |
| 305 | 305 |
| 306 } // namespace content | 306 } // namespace content |
| OLD | NEW |