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

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

Issue 9370013: Simplify the handling of crashed extensions. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 10 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) 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/extensions/extension_host.h" 5 #include "chrome/browser/extensions/extension_host.h"
6 6
7 #include <list> 7 #include <list>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/memory/singleton.h" 10 #include "base/memory/singleton.h"
(...skipping 288 matching lines...) Expand 10 before | Expand all | Expand 10 after
299 // popup, for example). When the first ExtensionHost goes away, the extension 299 // popup, for example). When the first ExtensionHost goes away, the extension
300 // is unloaded, and any other host that pointed to that extension will have 300 // is unloaded, and any other host that pointed to that extension will have
301 // its pointer to it NULLed out so that any attempt to unload a dirty pointer 301 // its pointer to it NULLed out so that any attempt to unload a dirty pointer
302 // will be averted. 302 // will be averted.
303 if (!extension_) 303 if (!extension_)
304 return; 304 return;
305 305
306 // TODO(aa): This is suspicious. There can be multiple views in an extension, 306 // TODO(aa): This is suspicious. There can be multiple views in an extension,
307 // and they aren't all going to use ExtensionHost. This should be in someplace 307 // and they aren't all going to use ExtensionHost. This should be in someplace
308 // more central, like EPM maybe. 308 // more central, like EPM maybe.
309 // TODO(aa): Change this name to EXTENSION_HOST_DESTROYED and put a TODO to
310 // stop using it.
309 content::NotificationService::current()->Notify( 311 content::NotificationService::current()->Notify(
310 chrome::NOTIFICATION_EXTENSION_PROCESS_TERMINATED, 312 chrome::NOTIFICATION_EXTENSION_PROCESS_TERMINATED,
311 content::Source<Profile>(profile_), 313 content::Source<Profile>(profile_),
312 content::Details<ExtensionHost>(this)); 314 content::Details<ExtensionHost>(this));
313 } 315 }
314 316
315 void ExtensionHost::InsertInfobarCSS() { 317 void ExtensionHost::InsertInfobarCSS() {
316 DCHECK(!is_background_page()); 318 DCHECK(!is_background_page());
317 319
318 static const base::StringPiece css( 320 static const base::StringPiece css(
(...skipping 249 matching lines...) Expand 10 before | Expand all | Expand 10 after
568 browser::Navigate(&params); 570 browser::Navigate(&params);
569 } 571 }
570 572
571 573
572 void ExtensionHost::RenderViewReady() { 574 void ExtensionHost::RenderViewReady() {
573 content::NotificationService::current()->Notify( 575 content::NotificationService::current()->Notify(
574 chrome::NOTIFICATION_EXTENSION_HOST_CREATED, 576 chrome::NOTIFICATION_EXTENSION_HOST_CREATED,
575 content::Source<Profile>(profile_), 577 content::Source<Profile>(profile_),
576 content::Details<ExtensionHost>(this)); 578 content::Details<ExtensionHost>(this));
577 } 579 }
OLDNEW
« no previous file with comments | « chrome/browser/background/background_contents_service.cc ('k') | chrome/browser/extensions/extension_service.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698