| OLD | NEW |
| 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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/plugin_service.h" | 5 #include "chrome/browser/plugin_service.h" |
| 6 | 6 |
| 7 #include <vector> | 7 #include <vector> |
| 8 | 8 |
| 9 #include "base/command_line.h" | 9 #include "base/command_line.h" |
| 10 #include "base/path_service.h" | 10 #include "base/path_service.h" |
| (...skipping 200 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 211 #endif | 211 #endif |
| 212 registrar_.Add(this, NotificationType::PLUGIN_ENABLE_STATUS_CHANGED, | 212 registrar_.Add(this, NotificationType::PLUGIN_ENABLE_STATUS_CHANGED, |
| 213 NotificationService::AllSources()); | 213 NotificationService::AllSources()); |
| 214 } | 214 } |
| 215 | 215 |
| 216 PluginService::~PluginService() { | 216 PluginService::~PluginService() { |
| 217 #if defined(OS_WIN) | 217 #if defined(OS_WIN) |
| 218 // Release the events since they're owned by RegKey, not WaitableEvent. | 218 // Release the events since they're owned by RegKey, not WaitableEvent. |
| 219 hkcu_watcher_.StopWatching(); | 219 hkcu_watcher_.StopWatching(); |
| 220 hklm_watcher_.StopWatching(); | 220 hklm_watcher_.StopWatching(); |
| 221 hkcu_event_->Release(); | 221 if (hkcu_event_.get()) |
| 222 hklm_event_->Release(); | 222 hkcu_event_->Release(); |
| 223 if (hklm_event_.get()) |
| 224 hklm_event_->Release(); |
| 223 #endif | 225 #endif |
| 224 } | 226 } |
| 225 | 227 |
| 226 void PluginService::LoadChromePlugins( | 228 void PluginService::LoadChromePlugins( |
| 227 ResourceDispatcherHost* resource_dispatcher_host) { | 229 ResourceDispatcherHost* resource_dispatcher_host) { |
| 228 if (!enable_chrome_plugins_) | 230 if (!enable_chrome_plugins_) |
| 229 return; | 231 return; |
| 230 | 232 |
| 231 resource_dispatcher_host_ = resource_dispatcher_host; | 233 resource_dispatcher_host_ = resource_dispatcher_host; |
| 232 ChromePluginLib::LoadChromePlugins(GetCPBrowserFuncsForBrowser()); | 234 ChromePluginLib::LoadChromePlugins(GetCPBrowserFuncsForBrowser()); |
| (...skipping 253 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 486 #if defined(OS_LINUX) | 488 #if defined(OS_LINUX) |
| 487 // static | 489 // static |
| 488 void PluginService::RegisterFilePathWatcher( | 490 void PluginService::RegisterFilePathWatcher( |
| 489 FilePathWatcher *watcher, | 491 FilePathWatcher *watcher, |
| 490 const FilePath& path, | 492 const FilePath& path, |
| 491 FilePathWatcher::Delegate* delegate) { | 493 FilePathWatcher::Delegate* delegate) { |
| 492 bool result = watcher->Watch(path, delegate); | 494 bool result = watcher->Watch(path, delegate); |
| 493 DCHECK(result); | 495 DCHECK(result); |
| 494 } | 496 } |
| 495 #endif | 497 #endif |
| OLD | NEW |