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 "chrome/browser/plugins/chrome_plugin_service_filter.h" | 5 #include "chrome/browser/plugins/chrome_plugin_service_filter.h" |
6 | 6 |
7 #include "base/logging.h" | 7 #include "base/logging.h" |
8 #include "base/strings/utf_string_conversions.h" | 8 #include "base/strings/utf_string_conversions.h" |
9 #include "chrome/browser/plugins/plugin_metadata.h" | 9 #include "chrome/browser/plugins/plugin_metadata.h" |
10 #include "chrome/browser/plugins/plugin_prefs.h" | 10 #include "chrome/browser/plugins/plugin_prefs.h" |
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
52 overridden_plugin.plugin = plugin; | 52 overridden_plugin.plugin = plugin; |
53 details->overridden_plugins.push_back(overridden_plugin); | 53 details->overridden_plugins.push_back(overridden_plugin); |
54 } | 54 } |
55 | 55 |
56 void ChromePluginServiceFilter::RestrictPluginToProfileAndOrigin( | 56 void ChromePluginServiceFilter::RestrictPluginToProfileAndOrigin( |
57 const base::FilePath& plugin_path, | 57 const base::FilePath& plugin_path, |
58 Profile* profile, | 58 Profile* profile, |
59 const GURL& origin) { | 59 const GURL& origin) { |
60 base::AutoLock auto_lock(lock_); | 60 base::AutoLock auto_lock(lock_); |
61 restricted_plugins_[plugin_path] = | 61 restricted_plugins_[plugin_path] = |
62 std::make_pair(PluginPrefs::GetForProfile(profile), | 62 std::make_pair(PluginPrefs::GetForProfile(profile).get(), origin); |
63 origin); | |
64 } | 63 } |
65 | 64 |
66 void ChromePluginServiceFilter::UnrestrictPlugin( | 65 void ChromePluginServiceFilter::UnrestrictPlugin( |
67 const base::FilePath& plugin_path) { | 66 const base::FilePath& plugin_path) { |
68 base::AutoLock auto_lock(lock_); | 67 base::AutoLock auto_lock(lock_); |
69 restricted_plugins_.erase(plugin_path); | 68 restricted_plugins_.erase(plugin_path); |
70 } | 69 } |
71 | 70 |
72 bool ChromePluginServiceFilter::IsPluginAvailable( | 71 bool ChromePluginServiceFilter::IsPluginAvailable( |
73 int render_process_id, | 72 int render_process_id, |
(...skipping 144 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
218 | 217 |
219 ChromePluginServiceFilter::OverriddenPlugin::~OverriddenPlugin() { | 218 ChromePluginServiceFilter::OverriddenPlugin::~OverriddenPlugin() { |
220 } | 219 } |
221 | 220 |
222 ChromePluginServiceFilter::ProcessDetails::ProcessDetails() { | 221 ChromePluginServiceFilter::ProcessDetails::ProcessDetails() { |
223 } | 222 } |
224 | 223 |
225 ChromePluginServiceFilter::ProcessDetails::~ProcessDetails() { | 224 ChromePluginServiceFilter::ProcessDetails::~ProcessDetails() { |
226 } | 225 } |
227 | 226 |
OLD | NEW |