| OLD | NEW |
| 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 #include "components/bookmarks/test/test_bookmark_client.h" | 5 #include "components/bookmarks/test/test_bookmark_client.h" |
| 6 | 6 |
| 7 #include "base/bind.h" | 7 #include "base/bind.h" |
| 8 #include "base/bind_helpers.h" | 8 #include "base/bind_helpers.h" |
| 9 #include "base/logging.h" | 9 #include "base/logging.h" |
| 10 #include "components/bookmarks/browser/bookmark_model.h" | 10 #include "components/bookmarks/browser/bookmark_model.h" |
| 11 #include "components/bookmarks/browser/bookmark_node.h" | 11 #include "components/bookmarks/browser/bookmark_node.h" |
| 12 #include "components/bookmarks/browser/bookmark_storage.h" | 12 #include "components/bookmarks/browser/bookmark_storage.h" |
| 13 | 13 |
| 14 namespace test { | 14 namespace test { |
| 15 | 15 |
| 16 TestBookmarkClient::TestBookmarkClient() {} | 16 TestBookmarkClient::TestBookmarkClient() {} |
| 17 | 17 |
| 18 TestBookmarkClient::~TestBookmarkClient() {} | 18 TestBookmarkClient::~TestBookmarkClient() {} |
| 19 | 19 |
| 20 scoped_ptr<BookmarkModel> TestBookmarkClient::CreateModel() { | 20 scoped_ptr<BookmarkModel> TestBookmarkClient::CreateModel(bool index_urls) { |
| 21 scoped_ptr<BookmarkModel> bookmark_model(new BookmarkModel(this)); | 21 scoped_ptr<BookmarkModel> bookmark_model(new BookmarkModel(this, index_urls)); |
| 22 scoped_ptr<bookmarks::BookmarkLoadDetails> details = | 22 scoped_ptr<bookmarks::BookmarkLoadDetails> details = |
| 23 bookmark_model->CreateLoadDetails(std::string()); | 23 bookmark_model->CreateLoadDetails(std::string()); |
| 24 details->LoadExtraNodes(); | 24 details->LoadExtraNodes(); |
| 25 bookmark_model->DoneLoading(details.Pass()); | 25 bookmark_model->DoneLoading(details.Pass()); |
| 26 return bookmark_model.Pass(); | 26 return bookmark_model.Pass(); |
| 27 } | 27 } |
| 28 | 28 |
| 29 void TestBookmarkClient::SetExtraNodesToLoad( | 29 void TestBookmarkClient::SetExtraNodesToLoad( |
| 30 bookmarks::BookmarkPermanentNodeList extra_nodes) { | 30 bookmarks::BookmarkPermanentNodeList extra_nodes) { |
| 31 extra_nodes_to_load_ = extra_nodes.Pass(); | 31 extra_nodes_to_load_ = extra_nodes.Pass(); |
| (...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 82 } | 82 } |
| 83 | 83 |
| 84 // static | 84 // static |
| 85 bookmarks::BookmarkPermanentNodeList TestBookmarkClient::LoadExtraNodes( | 85 bookmarks::BookmarkPermanentNodeList TestBookmarkClient::LoadExtraNodes( |
| 86 bookmarks::BookmarkPermanentNodeList extra_nodes, | 86 bookmarks::BookmarkPermanentNodeList extra_nodes, |
| 87 int64* next_id) { | 87 int64* next_id) { |
| 88 return extra_nodes.Pass(); | 88 return extra_nodes.Pass(); |
| 89 } | 89 } |
| 90 | 90 |
| 91 } // namespace test | 91 } // namespace test |
| OLD | NEW |