Backout f8b7d116a096 for Tp regression

This commit is contained in:
Brian Nicholson 2012-03-21 17:29:43 -07:00
Родитель f36a2a5784
Коммит 234b5860ae
3 изменённых файлов: 5 добавлений и 16 удалений

Просмотреть файл

@ -145,7 +145,7 @@ pref("browser.sessionhistory.max_entries", 50);
/* session store */
pref("browser.sessionstore.resume_session_once", false);
pref("browser.sessionstore.resume_from_crash", false);
pref("browser.sessionstore.resume_from_crash", true);
pref("browser.sessionstore.resume_from_crash_timeout", 60); // minutes
pref("browser.sessionstore.interval", 10000); // milliseconds
pref("browser.sessionstore.max_tabs_undo", 1);

Просмотреть файл

@ -1677,10 +1677,9 @@ abstract public class GeckoApp
if (uri != null && uri.length() > 0)
passedUri = mLastTitle = uri;
mRestoreSession |= getProfile().shouldRestoreSession();
if (passedUri == null || passedUri.equals("about:home")) {
// show about:home if we aren't restoring previous session
if (!mRestoreSession) {
if (! getProfile().hasSession()) {
mBrowserToolbar.updateTabCount(1);
showAboutHome();
}

Просмотреть файл

@ -33,9 +33,6 @@ public final class GeckoProfile {
private File mMozDir;
private File mDir;
// this short timeout is a temporary fix until bug 735399 is implemented
private static final long SESSION_TIMEOUT = 30 * 1000; // 30 seconds
public static GeckoProfile get(Context context) {
return get(context, null);
}
@ -83,19 +80,12 @@ public final class GeckoProfile {
return mDir;
}
public boolean shouldRestoreSession() {
public boolean hasSession() {
Log.w(LOGTAG, "zerdatime " + SystemClock.uptimeMillis() + " - start check sessionstore.js exists");
File dir = getDir();
if (dir == null)
return false;
File sessionFile = new File(dir, "sessionstore.js");
if (!sessionFile.exists())
return false;
boolean shouldRestore = (System.currentTimeMillis() - sessionFile.lastModified() < SESSION_TIMEOUT);
boolean hasSession = (dir != null && new File(dir, "sessionstore.js").exists());
Log.w(LOGTAG, "zerdatime " + SystemClock.uptimeMillis() + " - finish check sessionstore.js exists");
return shouldRestore;
return hasSession;
}
public String readSessionFile(boolean geckoReady) {