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: components/sessions/core/persistent_tab_restore_service.h

Issue 1912843002: Convert //components/sessions from scoped_ptr to std::unique_ptr (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 8 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 <vector> 9 #include <vector>
9 10
10 #include "base/compiler_specific.h" 11 #include "base/compiler_specific.h"
11 #include "base/macros.h" 12 #include "base/macros.h"
12 #include "base/memory/scoped_ptr.h"
13 #include "components/sessions/core/sessions_export.h" 13 #include "components/sessions/core/sessions_export.h"
14 #include "components/sessions/core/tab_restore_service.h" 14 #include "components/sessions/core/tab_restore_service.h"
15 #include "components/sessions/core/tab_restore_service_client.h" 15 #include "components/sessions/core/tab_restore_service_client.h"
16 #include "components/sessions/core/tab_restore_service_helper.h" 16 #include "components/sessions/core/tab_restore_service_helper.h"
17 17
18 class PersistentTabRestoreServiceTest; 18 class PersistentTabRestoreServiceTest;
19 19
20 namespace sessions { 20 namespace sessions {
21 21
22 // Tab restore service that persists data on disk. 22 // Tab restore service that persists data on disk.
23 class SESSIONS_EXPORT PersistentTabRestoreService : public TabRestoreService { 23 class SESSIONS_EXPORT PersistentTabRestoreService : public TabRestoreService {
24 public: 24 public:
25 // Does not take ownership of |time_factory|. 25 // Does not take ownership of |time_factory|.
26 PersistentTabRestoreService(scoped_ptr<TabRestoreServiceClient> client, 26 PersistentTabRestoreService(std::unique_ptr<TabRestoreServiceClient> client,
27 TimeFactory* time_factory); 27 TimeFactory* time_factory);
28 28
29 ~PersistentTabRestoreService() override; 29 ~PersistentTabRestoreService() override;
30 30
31 // TabRestoreService: 31 // TabRestoreService:
32 void AddObserver(TabRestoreServiceObserver* observer) override; 32 void AddObserver(TabRestoreServiceObserver* observer) override;
33 void RemoveObserver(TabRestoreServiceObserver* observer) override; 33 void RemoveObserver(TabRestoreServiceObserver* observer) override;
34 void CreateHistoricalTab(LiveTab* live_tab, int index) override; 34 void CreateHistoricalTab(LiveTab* live_tab, int index) override;
35 void BrowserClosing(LiveTabContext* context) override; 35 void BrowserClosing(LiveTabContext* context) override;
36 void BrowserClosed(LiveTabContext* context) override; 36 void BrowserClosed(LiveTabContext* context) override;
(...skipping 13 matching lines...) Expand all
50 50
51 private: 51 private:
52 friend class ::PersistentTabRestoreServiceTest; 52 friend class ::PersistentTabRestoreServiceTest;
53 53
54 class Delegate; 54 class Delegate;
55 55
56 // Exposed for testing. 56 // Exposed for testing.
57 Entries* mutable_entries(); 57 Entries* mutable_entries();
58 void PruneEntries(); 58 void PruneEntries();
59 59
60 scoped_ptr<TabRestoreServiceClient> client_; 60 std::unique_ptr<TabRestoreServiceClient> client_;
61 scoped_ptr<Delegate> delegate_; 61 std::unique_ptr<Delegate> delegate_;
62 TabRestoreServiceHelper helper_; 62 TabRestoreServiceHelper helper_;
63 63
64 DISALLOW_COPY_AND_ASSIGN(PersistentTabRestoreService); 64 DISALLOW_COPY_AND_ASSIGN(PersistentTabRestoreService);
65 }; 65 };
66 66
67 } // namespace sessions 67 } // namespace sessions
68 68
69 #endif // COMPONENTS_SESSIONS_CORE_PERSISTENT_TAB_RESTORE_SERVICE_H_ 69 #endif // COMPONENTS_SESSIONS_CORE_PERSISTENT_TAB_RESTORE_SERVICE_H_
OLDNEW
« no previous file with comments | « components/sessions/core/live_tab.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