 Chromium Code Reviews
 Chromium Code Reviews Issue 138843006:
  Close crashed incognito-mode app's shell window.  (Closed) 
  Base URL: svn://svn.chromium.org/chrome/trunk/src
    
  
    Issue 138843006:
  Close crashed incognito-mode app's shell window.  (Closed) 
  Base URL: svn://svn.chromium.org/chrome/trunk/src| Index: apps/shell_window.cc | 
| diff --git a/apps/shell_window.cc b/apps/shell_window.cc | 
| index 9c0247aef560ccf9a429c63df120539be4d452a9..6db1cbdd5fcea376dc9170a72ea17e9ab2ad7915 100644 | 
| --- a/apps/shell_window.cc | 
| +++ b/apps/shell_window.cc | 
| @@ -208,7 +208,7 @@ void ShellWindow::Init(const GURL& url, | 
| // properly. In particular, on Windows, the view's clickthrough region needs | 
| // to be set. | 
| registrar_.Add(this, chrome::NOTIFICATION_EXTENSION_UNLOADED, | 
| - content::Source<Profile>(profile_)); | 
| + content::NotificationService::AllSources()); | 
| 
Yoyo Zhou
2014/01/30 08:54:25
Use profile_->GetOriginalProfile instead. Then you
 
kinaba
2014/01/30 10:43:21
Good point. Thanks. Done.
 | 
| // Close when the browser process is exiting. | 
| registrar_.Add(this, chrome::NOTIFICATION_APP_TERMINATING, | 
| content::NotificationService::AllSources()); | 
| @@ -743,7 +743,8 @@ void ShellWindow::Observe(int type, | 
| const extensions::Extension* unloaded_extension = | 
| content::Details<extensions::UnloadedExtensionInfo>( | 
| details)->extension; | 
| - if (extension_ == unloaded_extension) | 
| + Profile* profile = content::Source<Profile>(source).ptr(); | 
| + if (profile_->IsSameProfile(profile) && extension_ == unloaded_extension) | 
| native_app_window_->Close(); | 
| break; | 
| } |