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

Side by Side Diff: components/bookmarks/test/test_bookmark_client.h

Issue 1906973002: Convert //components/bookmarks 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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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_BOOKMARKS_TEST_TEST_BOOKMARK_CLIENT_H_ 5 #ifndef COMPONENTS_BOOKMARKS_TEST_TEST_BOOKMARK_CLIENT_H_
6 #define COMPONENTS_BOOKMARKS_TEST_TEST_BOOKMARK_CLIENT_H_ 6 #define COMPONENTS_BOOKMARKS_TEST_TEST_BOOKMARK_CLIENT_H_
7 7
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include <memory>
11
10 #include "base/macros.h" 12 #include "base/macros.h"
11 #include "base/memory/scoped_ptr.h"
12 #include "components/bookmarks/browser/bookmark_client.h" 13 #include "components/bookmarks/browser/bookmark_client.h"
13 14
14 namespace bookmarks { 15 namespace bookmarks {
15 16
16 class BookmarkModel; 17 class BookmarkModel;
17 18
18 class TestBookmarkClient : public BookmarkClient { 19 class TestBookmarkClient : public BookmarkClient {
19 public: 20 public:
20 TestBookmarkClient(); 21 TestBookmarkClient();
21 ~TestBookmarkClient() override; 22 ~TestBookmarkClient() override;
22 23
23 // Returns a new BookmarkModel using a TestBookmarkClient. 24 // Returns a new BookmarkModel using a TestBookmarkClient.
24 static scoped_ptr<BookmarkModel> CreateModel(); 25 static std::unique_ptr<BookmarkModel> CreateModel();
25 26
26 // Returns a new BookmarkModel using |client|. 27 // Returns a new BookmarkModel using |client|.
27 static scoped_ptr<BookmarkModel> CreateModelWithClient( 28 static std::unique_ptr<BookmarkModel> CreateModelWithClient(
28 scoped_ptr<BookmarkClient> client); 29 std::unique_ptr<BookmarkClient> client);
29 30
30 // Sets the list of extra nodes to be returned by the next call to 31 // Sets the list of extra nodes to be returned by the next call to
31 // CreateModel() or GetLoadExtraNodesCallback(). 32 // CreateModel() or GetLoadExtraNodesCallback().
32 void SetExtraNodesToLoad(BookmarkPermanentNodeList extra_nodes); 33 void SetExtraNodesToLoad(BookmarkPermanentNodeList extra_nodes);
33 34
34 // Returns the current extra_nodes, set via SetExtraNodesToLoad(). 35 // Returns the current extra_nodes, set via SetExtraNodesToLoad().
35 const std::vector<BookmarkPermanentNode*>& extra_nodes() { 36 const std::vector<BookmarkPermanentNode*>& extra_nodes() {
36 return extra_nodes_; 37 return extra_nodes_;
37 } 38 }
38 39
(...skipping 19 matching lines...) Expand all
58 59
59 BookmarkPermanentNodeList extra_nodes_to_load_; 60 BookmarkPermanentNodeList extra_nodes_to_load_;
60 std::vector<BookmarkPermanentNode*> extra_nodes_; 61 std::vector<BookmarkPermanentNode*> extra_nodes_;
61 62
62 DISALLOW_COPY_AND_ASSIGN(TestBookmarkClient); 63 DISALLOW_COPY_AND_ASSIGN(TestBookmarkClient);
63 }; 64 };
64 65
65 } // namespace bookmarks 66 } // namespace bookmarks
66 67
67 #endif // COMPONENTS_BOOKMARKS_TEST_TEST_BOOKMARK_CLIENT_H_ 68 #endif // COMPONENTS_BOOKMARKS_TEST_TEST_BOOKMARK_CLIENT_H_
OLDNEW
« no previous file with comments | « components/bookmarks/managed/managed_bookmarks_tracker_unittest.cc ('k') | components/bookmarks/test/test_bookmark_client.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698