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

Side by Side 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef UI_COMPOSITOR_TEST_TEST_SUITE_H_ 5 #ifndef CHROME_BROWSER_SESSIONS_PERSISTENT_TAB_RESTORE_SERVICE_H_
6 #define UI_COMPOSITOR_TEST_TEST_SUITE_H_ 6 #define CHROME_BROWSER_SESSIONS_PERSISTENT_TAB_RESTORE_SERVICE_H_
7 7
8 #include "base/basictypes.h" 8 #include "base/basictypes.h"
9 #include "base/compiler_specific.h" 9 #include "base/compiler_specific.h"
10 #include "base/memory/scoped_ptr.h" 10 #include "base/memory/scoped_ptr.h"
11 #include "base/test/test_suite.h" 11 #include "chrome/browser/sessions/in_memory_tab_restore_service.h"
12 12
13 class MessageLoop; 13 class Profile;
14 14
15 namespace ui { 15 // Tab restore service that persists data on disk.
16 namespace test { 16 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.
17 public:
18 PersistentTabRestoreService(Profile* profile,
19 TimeFactory* time_factory = NULL);
17 20
18 class CompositorTestSuite : public base::TestSuite { 21 virtual ~PersistentTabRestoreService();
19 public:
20 CompositorTestSuite(int argc, char** argv);
21 virtual ~CompositorTestSuite();
22 22
23 protected: 23 // InMemoryTabRestoreService:
24 // Overridden from base::TestSuite: 24 virtual bool IsLoaded() const OVERRIDE;
25 virtual void Initialize() OVERRIDE; 25 virtual void LoadTabsFromLastSession() OVERRIDE;
26 virtual void Shutdown() OVERRIDE; 26 virtual void Shutdown() OVERRIDE;
27 virtual void OnClearEntries() OVERRIDE;
28 virtual void OnRestoreEntryById(
29 SessionID::id_type id,
30 Entries::const_iterator entry_iterator) OVERRIDE;
31 virtual void OnAddEntry() OVERRIDE;
27 32
28 private: 33 private:
29 scoped_ptr<MessageLoop> message_loop_; 34 class Delegate;
35 friend class Delegate;
30 36
31 DISALLOW_COPY_AND_ASSIGN(CompositorTestSuite); 37 scoped_ptr<Delegate> delegate_;
38
39 DISALLOW_COPY_AND_ASSIGN(PersistentTabRestoreService);
32 }; 40 };
33 41
34 } // namespace test 42 #endif // CHROME_BROWSER_SESSIONS_PERSISTENT_TAB_RESTORE_SERVICE_H_
35 } // namespace ui
36
37 #endif // UI_COMPOSITOR_TEST_TEST_SUITE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698