OLD | NEW |
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 #include "content/browser/download/download_item_impl.h" | 5 #include "content/browser/download/download_item_impl.h" |
6 | 6 |
7 #include <stdint.h> | 7 #include <stdint.h> |
8 | 8 |
9 #include <iterator> | 9 #include <iterator> |
10 #include <queue> | 10 #include <queue> |
(...skipping 236 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
247 create_info_.reset(new DownloadCreateInfo()); | 247 create_info_.reset(new DownloadCreateInfo()); |
248 create_info_->save_info = | 248 create_info_->save_info = |
249 std::unique_ptr<DownloadSaveInfo>(new DownloadSaveInfo()); | 249 std::unique_ptr<DownloadSaveInfo>(new DownloadSaveInfo()); |
250 create_info_->save_info->prompt_for_save_location = false; | 250 create_info_->save_info->prompt_for_save_location = false; |
251 create_info_->url_chain.push_back(GURL("http://example.com/download")); | 251 create_info_->url_chain.push_back(GURL("http://example.com/download")); |
252 create_info_->etag = "SomethingToSatisfyResumption"; | 252 create_info_->etag = "SomethingToSatisfyResumption"; |
253 } | 253 } |
254 | 254 |
255 ~DownloadItemTest() { | 255 ~DownloadItemTest() { |
256 RunAllPendingInMessageLoops(); | 256 RunAllPendingInMessageLoops(); |
257 STLDeleteElements(&allocated_downloads_); | 257 base::STLDeleteElements(&allocated_downloads_); |
258 } | 258 } |
259 | 259 |
260 DownloadItemImpl* CreateDownloadItemWithCreateInfo( | 260 DownloadItemImpl* CreateDownloadItemWithCreateInfo( |
261 std::unique_ptr<DownloadCreateInfo> info) { | 261 std::unique_ptr<DownloadCreateInfo> info) { |
262 DownloadItemImpl* download = new DownloadItemImpl( | 262 DownloadItemImpl* download = new DownloadItemImpl( |
263 &delegate_, next_download_id_++, *(info.get()), net::BoundNetLog()); | 263 &delegate_, next_download_id_++, *(info.get()), net::BoundNetLog()); |
264 allocated_downloads_.insert(download); | 264 allocated_downloads_.insert(download); |
265 return download; | 265 return download; |
266 } | 266 } |
267 | 267 |
(...skipping 1757 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2025 | 2025 |
2026 item_->Cancel(true); | 2026 item_->Cancel(true); |
2027 RunAllPendingInMessageLoops(); | 2027 RunAllPendingInMessageLoops(); |
2028 } | 2028 } |
2029 | 2029 |
2030 TEST(MockDownloadItem, Compiles) { | 2030 TEST(MockDownloadItem, Compiles) { |
2031 MockDownloadItem mock_item; | 2031 MockDownloadItem mock_item; |
2032 } | 2032 } |
2033 | 2033 |
2034 } // namespace content | 2034 } // namespace content |
OLD | NEW |