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

Side by Side Diff: chrome/browser/extensions/extension_process_manager.cc

Issue 6948007: Merge 84502 - avoid dereferencing NULL extension in ExtensionHost (Closed) Base URL: svn://svn.chromium.org/chrome/branches/742/src/
Patch Set: Created 9 years, 7 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
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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/extensions/extension_process_manager.h" 5 #include "chrome/browser/extensions/extension_process_manager.h"
6 6
7 #include "chrome/browser/ui/browser_window.h" 7 #include "chrome/browser/ui/browser_window.h"
8 #include "content/browser/browsing_instance.h" 8 #include "content/browser/browsing_instance.h"
9 #if defined(OS_MACOSX) 9 #if defined(OS_MACOSX)
10 #include "chrome/browser/extensions/extension_host_mac.h" 10 #include "chrome/browser/extensions/extension_host_mac.h"
(...skipping 288 matching lines...) Expand 10 before | Expand all | Expand 10 after
299 } 299 }
300 break; 300 break;
301 } 301 }
302 302
303 case NotificationType::EXTENSION_UNLOADED: { 303 case NotificationType::EXTENSION_UNLOADED: {
304 const Extension* extension = 304 const Extension* extension =
305 Details<UnloadedExtensionInfo>(details)->extension; 305 Details<UnloadedExtensionInfo>(details)->extension;
306 for (ExtensionHostSet::iterator iter = background_hosts_.begin(); 306 for (ExtensionHostSet::iterator iter = background_hosts_.begin();
307 iter != background_hosts_.end(); ++iter) { 307 iter != background_hosts_.end(); ++iter) {
308 ExtensionHost* host = *iter; 308 ExtensionHost* host = *iter;
309 if (host->extension()->id() == extension->id()) { 309 if (host->extension_id() == extension->id()) {
310 delete host; 310 delete host;
311 // |host| should deregister itself from our structures. 311 // |host| should deregister itself from our structures.
312 DCHECK(background_hosts_.find(host) == background_hosts_.end()); 312 DCHECK(background_hosts_.find(host) == background_hosts_.end());
313 break; 313 break;
314 } 314 }
315 } 315 }
316 break; 316 break;
317 } 317 }
318 318
319 case NotificationType::EXTENSION_HOST_DESTROYED: { 319 case NotificationType::EXTENSION_HOST_DESTROYED: {
(...skipping 147 matching lines...) Expand 10 before | Expand all | Expand 10 after
467 if (service && service->is_ready()) 467 if (service && service->is_ready())
468 CreateBackgroundHosts(this, service->extensions()); 468 CreateBackgroundHosts(this, service->extensions());
469 } 469 }
470 break; 470 break;
471 } 471 }
472 default: 472 default:
473 ExtensionProcessManager::Observe(type, source, details); 473 ExtensionProcessManager::Observe(type, source, details);
474 break; 474 break;
475 } 475 }
476 } 476 }
OLDNEW
« no previous file with comments | « chrome/browser/extensions/extension_host.cc ('k') | chrome/browser/extensions/extension_service.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698