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

Side by Side Diff: components/sessions/core/persistent_tab_restore_service.h

Issue 2345763002: Fix tabs duplication when restoring last closed window. (Closed)
Patch Set: Fix comments. Created 4 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 unified diff | Download patch
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 COMPONENTS_SESSIONS_CORE_PERSISTENT_TAB_RESTORE_SERVICE_H_ 5 #ifndef COMPONENTS_SESSIONS_CORE_PERSISTENT_TAB_RESTORE_SERVICE_H_
6 #define COMPONENTS_SESSIONS_CORE_PERSISTENT_TAB_RESTORE_SERVICE_H_ 6 #define COMPONENTS_SESSIONS_CORE_PERSISTENT_TAB_RESTORE_SERVICE_H_
7 7
8 #include <memory> 8 #include <memory>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 28 matching lines...) Expand all
39 std::vector<LiveTab*> RestoreMostRecentEntry( 39 std::vector<LiveTab*> RestoreMostRecentEntry(
40 LiveTabContext* context) override; 40 LiveTabContext* context) override;
41 std::unique_ptr<Tab> RemoveTabEntryById(SessionID::id_type id) override; 41 std::unique_ptr<Tab> RemoveTabEntryById(SessionID::id_type id) override;
42 std::vector<LiveTab*> RestoreEntryById( 42 std::vector<LiveTab*> RestoreEntryById(
43 LiveTabContext* context, 43 LiveTabContext* context,
44 SessionID::id_type id, 44 SessionID::id_type id,
45 WindowOpenDisposition disposition) override; 45 WindowOpenDisposition disposition) override;
46 void LoadTabsFromLastSession() override; 46 void LoadTabsFromLastSession() override;
47 bool IsLoaded() const override; 47 bool IsLoaded() const override;
48 void DeleteLastSession() override; 48 void DeleteLastSession() override;
49 bool IsRestoring() const override;
49 void Shutdown() override; 50 void Shutdown() override;
50 51
51 private: 52 private:
52 friend class ::PersistentTabRestoreServiceTest; 53 friend class ::PersistentTabRestoreServiceTest;
53 54
54 class Delegate; 55 class Delegate;
55 56
56 // Exposed for testing. 57 // Exposed for testing.
57 Entries* mutable_entries(); 58 Entries* mutable_entries();
58 void PruneEntries(); 59 void PruneEntries();
59 60
60 std::unique_ptr<TabRestoreServiceClient> client_; 61 std::unique_ptr<TabRestoreServiceClient> client_;
61 std::unique_ptr<Delegate> delegate_; 62 std::unique_ptr<Delegate> delegate_;
62 TabRestoreServiceHelper helper_; 63 TabRestoreServiceHelper helper_;
63 64
64 DISALLOW_COPY_AND_ASSIGN(PersistentTabRestoreService); 65 DISALLOW_COPY_AND_ASSIGN(PersistentTabRestoreService);
65 }; 66 };
66 67
67 } // namespace sessions 68 } // namespace sessions
68 69
69 #endif // COMPONENTS_SESSIONS_CORE_PERSISTENT_TAB_RESTORE_SERVICE_H_ 70 #endif // COMPONENTS_SESSIONS_CORE_PERSISTENT_TAB_RESTORE_SERVICE_H_
OLDNEW
« no previous file with comments | « components/sessions/core/in_memory_tab_restore_service.cc ('k') | components/sessions/core/persistent_tab_restore_service.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698