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

Unified Diff: chrome/browser/metro_viewer/chrome_metro_viewer_process_host_aurawin.cc

Issue 102403004: Fixing reopening of tabs after relaunch by preventing reentry into AttemptExit process. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years 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: chrome/browser/metro_viewer/chrome_metro_viewer_process_host_aurawin.cc
diff --git a/chrome/browser/metro_viewer/chrome_metro_viewer_process_host_aurawin.cc b/chrome/browser/metro_viewer/chrome_metro_viewer_process_host_aurawin.cc
index 8d351cff002bca5cbc48b733aa692ebd5427aca3..4a373121f2705039d67959894a55249a0ce35df0 100644
--- a/chrome/browser/metro_viewer/chrome_metro_viewer_process_host_aurawin.cc
+++ b/chrome/browser/metro_viewer/chrome_metro_viewer_process_host_aurawin.cc
@@ -10,6 +10,7 @@
#include "base/memory/ref_counted.h"
#include "chrome/browser/browser_process.h"
#include "chrome/browser/browser_process_platform_part_aurawin.h"
+#include "chrome/browser/browser_shutdown.h"
#include "chrome/browser/chrome_notification_types.h"
#include "chrome/browser/lifetime/application_lifetime.h"
#include "chrome/browser/profiles/profile_manager.h"
@@ -79,8 +80,14 @@ void ChromeMetroViewerProcessHost::OnChannelError() {
aura::RemoteRootWindowHostWin::Instance()->Disconnected();
g_browser_process->ReleaseModule();
- CloseOpenAshBrowsers();
- chrome::CloseAsh();
+
+ // If browser is trying to quit, we shouldn't reenter the process.
+ // TODO(shrikant): In general there seem to be issues with how AttemptExit
+ // reentry works. In future release please clean up related code.
+ if (!browser_shutdown::IsTryingToQuit()) {
+ CloseOpenAshBrowsers();
+ chrome::CloseAsh();
+ }
// Tell the rest of Chrome about it.
content::NotificationService::current()->Notify(
chrome::NOTIFICATION_ASH_SESSION_ENDED,
« 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