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

Unified Diff: apps/shell_window.cc

Issue 138843006: Close crashed incognito-mode app's shell window. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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;
}
« 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