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

Unified Diff: chrome/browser/sessions/session_service.cc

Issue 10202005: Convert the session restore ui_tests to browser_tests. I renabled the disabled tests; hopefully the… (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: renable the mac test Created 8 years, 8 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/sessions/session_service.h ('k') | chrome/chrome_tests.gypi » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/sessions/session_service.cc
===================================================================
--- chrome/browser/sessions/session_service.cc (revision 133679)
+++ chrome/browser/sessions/session_service.cc (working copy)
@@ -198,7 +198,8 @@
move_on_new_browser_(false),
save_delay_in_millis_(base::TimeDelta::FromMilliseconds(2500)),
save_delay_in_mins_(base::TimeDelta::FromMinutes(10)),
- save_delay_in_hrs_(base::TimeDelta::FromHours(8)) {
+ save_delay_in_hrs_(base::TimeDelta::FromHours(8)),
+ force_browser_not_alive_with_no_windows_(false) {
Init();
}
@@ -208,7 +209,8 @@
move_on_new_browser_(false),
save_delay_in_millis_(base::TimeDelta::FromMilliseconds(2500)),
save_delay_in_mins_(base::TimeDelta::FromMinutes(10)),
- save_delay_in_hrs_(base::TimeDelta::FromHours(8)) {
+ save_delay_in_hrs_(base::TimeDelta::FromHours(8)),
+ force_browser_not_alive_with_no_windows_(false) {
Init();
}
@@ -525,7 +527,10 @@
// ChromeOS and OSX have different ideas of application lifetime than
// the other platforms.
// On ChromeOS opening a new window should never start a new session.
-#if !defined(OS_CHROMEOS)
+#if defined(OS_CHROMEOS)
+ if (!force_browser_not_alive_with_no_windows_)
+ return false;
+#endif
if (!has_open_trackable_browsers_ &&
!BrowserInit::InSynchronousProfileLaunch() &&
!SessionRestore::IsRestoring(profile())
@@ -537,7 +542,6 @@
) {
return true;
}
-#endif // !OS_CHROMEOS
return false;
}
« no previous file with comments | « chrome/browser/sessions/session_service.h ('k') | chrome/chrome_tests.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698