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

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

Issue 1931503002: Add BackgroundModeOptimizer that can restart the browser (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@PushKeepAlive
Patch Set: cleanup, enable by default (that's just to verify the tests) Created 4 years, 5 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
Index: chrome/browser/lifetime/application_lifetime.cc
diff --git a/chrome/browser/lifetime/application_lifetime.cc b/chrome/browser/lifetime/application_lifetime.cc
index 19fd12723278ea432ba7d93ae3c4f86534fdb26f..82e655634af04606780a1288771f34dd54d814d7 100644
--- a/chrome/browser/lifetime/application_lifetime.cc
+++ b/chrome/browser/lifetime/application_lifetime.cc
@@ -392,6 +392,15 @@ void OnAppExiting() {
notified = true;
HandleAppExitingForPlatform();
}
+
+void ResetRestartPrefs() {
+ PrefService* pref_service = g_browser_process->local_state();
+ if (!pref_service)
+ return;
+
+ pref_service->ClearPref(prefs::kWasRestarted);
+ pref_service->ClearPref(prefs::kRestartLastSessionOnShutdown);
+}
#endif // !defined(OS_ANDROID)
} // namespace chrome

Powered by Google App Engine
This is Rietveld 408576698