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

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

Issue 10989027: Split TabRestoreService into InMemoryTRS and PersistentTRS (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix build on Mac (not tested locally) Created 8 years, 2 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/persistent_tab_restore_service.h
diff --git a/ui/compositor/test/test_suite.h b/chrome/browser/sessions/persistent_tab_restore_service.h
similarity index 24%
copy from ui/compositor/test/test_suite.h
copy to chrome/browser/sessions/persistent_tab_restore_service.h
index b8be517adcabbfb0d42695da765e0db4d249145f..5f9bc7119ff20871cbc9c42f26e36c22a7e050e2 100644
--- a/ui/compositor/test/test_suite.h
+++ b/chrome/browser/sessions/persistent_tab_restore_service.h
@@ -2,36 +2,41 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#ifndef UI_COMPOSITOR_TEST_TEST_SUITE_H_
-#define UI_COMPOSITOR_TEST_TEST_SUITE_H_
+#ifndef CHROME_BROWSER_SESSIONS_PERSISTENT_TAB_RESTORE_SERVICE_H_
+#define CHROME_BROWSER_SESSIONS_PERSISTENT_TAB_RESTORE_SERVICE_H_
#include "base/basictypes.h"
#include "base/compiler_specific.h"
#include "base/memory/scoped_ptr.h"
-#include "base/test/test_suite.h"
+#include "chrome/browser/sessions/in_memory_tab_restore_service.h"
-class MessageLoop;
+class Profile;
-namespace ui {
-namespace test {
-
-class CompositorTestSuite : public base::TestSuite {
+// Tab restore service that persists data on disk.
+class PersistentTabRestoreService : public InMemoryTabRestoreService {
sky 2012/10/22 13:51:35 Again, there isn't a need for subclassing. Instead
Philippe 2012/10/23 15:07:36 Done.
public:
- CompositorTestSuite(int argc, char** argv);
- virtual ~CompositorTestSuite();
+ PersistentTabRestoreService(Profile* profile,
+ TimeFactory* time_factory = NULL);
+
+ virtual ~PersistentTabRestoreService();
- protected:
- // Overridden from base::TestSuite:
- virtual void Initialize() OVERRIDE;
+ // InMemoryTabRestoreService:
+ virtual bool IsLoaded() const OVERRIDE;
+ virtual void LoadTabsFromLastSession() OVERRIDE;
virtual void Shutdown() OVERRIDE;
+ virtual void OnClearEntries() OVERRIDE;
+ virtual void OnRestoreEntryById(
+ SessionID::id_type id,
+ Entries::const_iterator entry_iterator) OVERRIDE;
+ virtual void OnAddEntry() OVERRIDE;
private:
- scoped_ptr<MessageLoop> message_loop_;
+ class Delegate;
+ friend class Delegate;
- DISALLOW_COPY_AND_ASSIGN(CompositorTestSuite);
-};
+ scoped_ptr<Delegate> delegate_;
-} // namespace test
-} // namespace ui
+ DISALLOW_COPY_AND_ASSIGN(PersistentTabRestoreService);
+};
-#endif // UI_COMPOSITOR_TEST_TEST_SUITE_H_
+#endif // CHROME_BROWSER_SESSIONS_PERSISTENT_TAB_RESTORE_SERVICE_H_

Powered by Google App Engine
This is Rietveld 408576698