| 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 #ifndef CONTENT_BROWSER_DOWNLOAD_DOWNLOAD_ITEM_IMPL_H_ | 5 #ifndef CONTENT_BROWSER_DOWNLOAD_DOWNLOAD_ITEM_IMPL_H_ |
| 6 #define CONTENT_BROWSER_DOWNLOAD_DOWNLOAD_ITEM_IMPL_H_ | 6 #define CONTENT_BROWSER_DOWNLOAD_DOWNLOAD_ITEM_IMPL_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 | 9 |
| 10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
| (...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 46 static const int kMaxAutoResumeAttempts; | 46 static const int kMaxAutoResumeAttempts; |
| 47 | 47 |
| 48 // Note that it is the responsibility of the caller to ensure that a | 48 // Note that it is the responsibility of the caller to ensure that a |
| 49 // DownloadItemImplDelegate passed to a DownloadItemImpl constructor | 49 // DownloadItemImplDelegate passed to a DownloadItemImpl constructor |
| 50 // outlives the DownloadItemImpl. | 50 // outlives the DownloadItemImpl. |
| 51 | 51 |
| 52 // Constructing from persistent store: | 52 // Constructing from persistent store: |
| 53 // |bound_net_log| is constructed externally for our use. | 53 // |bound_net_log| is constructed externally for our use. |
| 54 DownloadItemImpl(DownloadItemImplDelegate* delegate, | 54 DownloadItemImpl(DownloadItemImplDelegate* delegate, |
| 55 DownloadId download_id, | 55 DownloadId download_id, |
| 56 const FilePath& path, | 56 const FilePath& current_path, |
| 57 const GURL& url, | 57 const FilePath& target_path, |
| 58 const std::vector<GURL>& url_chain, |
| 58 const GURL& referrer_url, | 59 const GURL& referrer_url, |
| 59 const base::Time& start_time, | 60 const base::Time& start_time, |
| 60 const base::Time& end_time, | 61 const base::Time& end_time, |
| 61 int64 received_bytes, | 62 int64 received_bytes, |
| 62 int64 total_bytes, | 63 int64 total_bytes, |
| 63 DownloadItem::DownloadState state, | 64 DownloadItem::DownloadState state, |
| 65 DownloadDangerType danger_type, |
| 66 DownloadInterruptReason interrupt_reason, |
| 64 bool opened, | 67 bool opened, |
| 65 const net::BoundNetLog& bound_net_log); | 68 const net::BoundNetLog& bound_net_log); |
| 66 | 69 |
| 67 // Constructing for a regular download. | 70 // Constructing for a regular download. |
| 68 // |bound_net_log| is constructed externally for our use. | 71 // |bound_net_log| is constructed externally for our use. |
| 69 DownloadItemImpl(DownloadItemImplDelegate* delegate, | 72 DownloadItemImpl(DownloadItemImplDelegate* delegate, |
| 70 const DownloadCreateInfo& info, | 73 const DownloadCreateInfo& info, |
| 71 const net::BoundNetLog& bound_net_log); | 74 const net::BoundNetLog& bound_net_log); |
| 72 | 75 |
| 73 // Constructing for the "Save Page As..." feature: | 76 // Constructing for the "Save Page As..." feature: |
| (...skipping 404 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 478 const net::BoundNetLog bound_net_log_; | 481 const net::BoundNetLog bound_net_log_; |
| 479 | 482 |
| 480 base::WeakPtrFactory<DownloadItemImpl> weak_ptr_factory_; | 483 base::WeakPtrFactory<DownloadItemImpl> weak_ptr_factory_; |
| 481 | 484 |
| 482 DISALLOW_COPY_AND_ASSIGN(DownloadItemImpl); | 485 DISALLOW_COPY_AND_ASSIGN(DownloadItemImpl); |
| 483 }; | 486 }; |
| 484 | 487 |
| 485 } // namespace content | 488 } // namespace content |
| 486 | 489 |
| 487 #endif // CONTENT_BROWSER_DOWNLOAD_DOWNLOAD_ITEM_IMPL_H_ | 490 #endif // CONTENT_BROWSER_DOWNLOAD_DOWNLOAD_ITEM_IMPL_H_ |
| OLD | NEW |