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

Side by Side Diff: chrome/browser/plugin_service.cc

Issue 6313007: Fix crash in PluginService if the keys are null. It's still unclear why this... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 9 years, 11 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 | « no previous file | 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) 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
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
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
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698