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

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

Issue 1309363007: [sessions] Remove most knowledge of //chrome from core tab restore code (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@tab_restore_service_client
Patch Set: Make OnTabRestored() optional Created 5 years, 3 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/tab_restore_service_helper.h
diff --git a/chrome/browser/sessions/tab_restore_service_helper.h b/chrome/browser/sessions/tab_restore_service_helper.h
index 7666833e53381b97d899f9762fa386f142309d56..56f8d1302fa310113cb8b98501875278436fafa0 100644
--- a/chrome/browser/sessions/tab_restore_service_helper.h
+++ b/chrome/browser/sessions/tab_restore_service_helper.h
@@ -27,6 +27,10 @@ class NavigationController;
class WebContents;
}
+namespace sessions {
+class TabRestoreServiceClient;
+}
+
// Helper class used to implement InMemoryTabRestoreService and
// PersistentTabRestoreService. See tab_restore_service.h for method-level
// comments.
@@ -68,6 +72,7 @@ class TabRestoreServiceHelper {
TabRestoreServiceHelper(TabRestoreService* tab_restore_service,
Observer* observer,
Profile* profile,
+ sessions::TabRestoreServiceClient* client,
TimeFactory* time_factory);
~TabRestoreServiceHelper();
@@ -149,14 +154,14 @@ class TabRestoreServiceHelper {
static bool ValidateWindow(Window* window);
// Returns true if |tab| is one we care about restoring.
- static bool IsTabInteresting(const Tab* tab);
+ bool IsTabInteresting(const Tab* tab);
// Checks whether |window| is interesting --- if it only contains a single,
// uninteresting tab, it's not interesting.
- static bool IsWindowInteresting(const Window* window);
+ bool IsWindowInteresting(const Window* window);
// Validates and checks |entry| for interesting.
- static bool FilterEntry(Entry* entry);
+ bool FilterEntry(Entry* entry);
// Finds tab entries with the old browser_id and sets it to the new one.
void UpdateTabBrowserIDs(SessionID::id_type old_id,
@@ -171,6 +176,8 @@ class TabRestoreServiceHelper {
Profile* const profile_;
+ sessions::TabRestoreServiceClient* client_;
+
// Set of entries. They are ordered from most to least recent.
Entries entries_;
« no previous file with comments | « chrome/browser/sessions/tab_restore_service_factory.cc ('k') | chrome/browser/sessions/tab_restore_service_helper.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698