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

Unified Diff: chrome/browser/lifetime/application_lifetime.cc

Issue 11633020: Re-enable about:flags on Android (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Addressing nilesh's comments Created 7 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 | « chrome/browser/browser_about_handler.cc ('k') | chrome/browser/lifetime/application_lifetime_android.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/lifetime/application_lifetime.cc
diff --git a/chrome/browser/lifetime/application_lifetime.cc b/chrome/browser/lifetime/application_lifetime.cc
index 25c3a2f77e68f0c943f6f2178bc8974893e19117..dc874b026966adba798f8d0cc63db04e9b2584bd 100644
--- a/chrome/browser/lifetime/application_lifetime.cc
+++ b/chrome/browser/lifetime/application_lifetime.cc
@@ -27,6 +27,10 @@
#include "content/public/browser/navigation_details.h"
#include "content/public/browser/notification_service.h"
+#if defined(OS_ANDROID)
+#include "chrome/browser/lifetime/application_lifetime_android.h"
+#endif
+
#if defined(OS_MACOSX)
#include "chrome/browser/chrome_browser_application_mac.h"
#endif
@@ -86,14 +90,17 @@ void AttemptExitInternal() {
content::NotificationService::AllSources(),
content::NotificationService::NoDetails());
-#if !defined(OS_MACOSX)
- // On most platforms, closing all windows causes the application to exit.
- CloseAllBrowsers();
-#else
+#if defined(OS_ANDROID)
+ // Tell the Java code to finish() the Activity.
+ TerminateAndroid();
+#elif defined(OS_MACOSX)
// On the Mac, the application continues to run once all windows are closed.
// Terminate will result in a CloseAllBrowsers() call, and once (and if)
// that is done, will cause the application to exit cleanly.
chrome_browser_application_mac::Terminate();
+#else
+ // On most platforms, closing all windows causes the application to exit.
+ CloseAllBrowsers();
#endif
}
@@ -236,6 +243,8 @@ void AttemptUserExit() {
#endif
}
+// The Android implementation is in application_lifetime_android.cc
+#if !defined(OS_ANDROID)
void AttemptRestart() {
// TODO(beng): Can this use ProfileManager::GetLoadedProfiles instead?
BrowserList::const_iterator it;
@@ -256,6 +265,7 @@ void AttemptRestart() {
AttemptExit();
#endif
}
+#endif
#if defined(OS_WIN)
void AttemptRestartWithModeSwitch() {
@@ -272,8 +282,11 @@ void AttemptExit() {
// don't notify users of crashes beyond this point.
// Note that MarkAsCleanShutdown() does not set UMA's exit cleanly bit
// so crashes during shutdown are still reported in UMA.
+#if !defined(OS_ANDROID)
+ // Android doesn't use Browser.
if (AreAllBrowsersCloseable())
MarkAsCleanShutdown();
+#endif
AttemptExitInternal();
}
« no previous file with comments | « chrome/browser/browser_about_handler.cc ('k') | chrome/browser/lifetime/application_lifetime_android.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698