OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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/history/core/test/history_backend_db_base_test.h" | 5 #include "components/history/core/test/history_backend_db_base_test.h" |
6 | 6 |
7 #include "base/files/file_path.h" | 7 #include "base/files/file_path.h" |
8 #include "base/location.h" | 8 #include "base/location.h" |
9 #include "base/single_thread_task_runner.h" | 9 #include "base/single_thread_task_runner.h" |
10 #include "base/strings/stringprintf.h" | 10 #include "base/strings/stringprintf.h" |
(...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
116 } | 116 } |
117 } | 117 } |
118 | 118 |
119 bool HistoryBackendDBBaseTest::AddDownload(uint32_t id, | 119 bool HistoryBackendDBBaseTest::AddDownload(uint32_t id, |
120 const std::string& guid, | 120 const std::string& guid, |
121 DownloadState state, | 121 DownloadState state, |
122 base::Time time) { | 122 base::Time time) { |
123 std::vector<GURL> url_chain; | 123 std::vector<GURL> url_chain; |
124 url_chain.push_back(GURL("foo-url")); | 124 url_chain.push_back(GURL("foo-url")); |
125 | 125 |
126 DownloadRow download(base::FilePath(FILE_PATH_LITERAL("current-path")), | 126 DownloadRow download( |
127 base::FilePath(FILE_PATH_LITERAL("target-path")), | 127 base::FilePath(FILE_PATH_LITERAL("current-path")), |
128 url_chain, | 128 base::FilePath(FILE_PATH_LITERAL("target-path")), url_chain, |
129 GURL("http://referrer.com/"), | 129 GURL("http://referrer.example.com/"), GURL("http://tab-url.example.com/"), |
130 std::string(), | 130 GURL("http://tab-referrer-url.example.com/"), std::string(), |
131 "application/vnd.oasis.opendocument.text", | 131 "application/vnd.oasis.opendocument.text", "application/octet-stream", |
132 "application/octet-stream", | 132 time, time, std::string(), std::string(), 0, 512, state, |
133 time, | 133 DownloadDangerType::NOT_DANGEROUS, kTestDownloadInterruptReasonNone, |
134 time, | 134 std::string(), id, guid, false, "by_ext_id", "by_ext_name"); |
135 std::string(), | |
136 std::string(), | |
137 0, | |
138 512, | |
139 state, | |
140 DownloadDangerType::NOT_DANGEROUS, | |
141 kTestDownloadInterruptReasonNone, | |
142 std::string(), | |
143 id, | |
144 guid, | |
145 false, | |
146 "by_ext_id", | |
147 "by_ext_name"); | |
148 return db_->CreateDownload(download); | 135 return db_->CreateDownload(download); |
149 } | 136 } |
150 | 137 |
151 } // namespace history | 138 } // namespace history |
OLD | NEW |