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

Unified Diff: chrome/browser/sessions/session_restore.h

Issue 1022583003: Changes session restore callback to always happen when tabs are created (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix test Created 5 years, 9 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/sessions/session_restore.h
diff --git a/chrome/browser/sessions/session_restore.h b/chrome/browser/sessions/session_restore.h
index cc1d75707943775a97f1bdb7d4778db0cd71dd1d..d38828494ea579628f45e016003d13d27dbbd072 100644
--- a/chrome/browser/sessions/session_restore.h
+++ b/chrome/browser/sessions/session_restore.h
@@ -91,19 +91,10 @@ class SessionRestore {
// Returns true if synchronously restoring a session.
static bool IsRestoringSynchronously();
- // Register callbacks for session restore events. These callbacks are stored
- // in |on_session_restored_callbacks_|.
- // The callback is supplied an integer arg representing a tab count. The exact
- // meaning and timing depend upon the restore type:
- // - SessionRestore::SYNCHRONOUS: the parameter is the number of tabs that
- // were created. Additionally the callback is invoked immediately after the
- // tabs have been created. That is, the tabs are not necessarily loading.
- // - For all other restore types the parameter is the number of tabs that were
- // restored and is sent after all tabs have started loading. Additionally if a
- // request to restore tabs comes in while a previous request to restore tabs
- // has not yet completed (loading tabs is throttled), then the callback is
- // only notified once both sets of tabs have started loading and with the
- // total number of tabs for both restores.
+ // Registers a callback that is notified every time session restore completes.
+ // Note that 'complete' means all the browsers and tabs have been created but
+ // have not necessarily finished loading. The integer supplied to the callback
+ // indicates the number of tabs that were created.
static CallbackSubscription RegisterOnSessionRestoredCallback(
const base::Callback<void(int)>& callback);
« no previous file with comments | « no previous file | chrome/browser/sessions/session_restore.cc » ('j') | chrome/browser/sessions/session_restore.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698