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

Side by Side Diff: content/browser/download/download_item_impl.h

Issue 2351513002: net: rename BoundNetLog to NetLogWithSource (Closed)
Patch Set: REBASE Created 4 years, 3 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 (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 <stdint.h> 8 #include <stdint.h>
9 9
10 #include <memory> 10 #include <memory>
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after
67 const base::Time& end_time, 67 const base::Time& end_time,
68 const std::string& etag, 68 const std::string& etag,
69 const std::string& last_modified, 69 const std::string& last_modified,
70 int64_t received_bytes, 70 int64_t received_bytes,
71 int64_t total_bytes, 71 int64_t total_bytes,
72 const std::string& hash, 72 const std::string& hash,
73 DownloadItem::DownloadState state, 73 DownloadItem::DownloadState state,
74 DownloadDangerType danger_type, 74 DownloadDangerType danger_type,
75 DownloadInterruptReason interrupt_reason, 75 DownloadInterruptReason interrupt_reason,
76 bool opened, 76 bool opened,
77 const net::BoundNetLog& bound_net_log); 77 const net::NetLogWithSource& bound_net_log);
78 78
79 // Constructing for a regular download. 79 // Constructing for a regular download.
80 // |bound_net_log| is constructed externally for our use. 80 // |bound_net_log| is constructed externally for our use.
81 DownloadItemImpl(DownloadItemImplDelegate* delegate, 81 DownloadItemImpl(DownloadItemImplDelegate* delegate,
82 uint32_t id, 82 uint32_t id,
83 const DownloadCreateInfo& info, 83 const DownloadCreateInfo& info,
84 const net::BoundNetLog& bound_net_log); 84 const net::NetLogWithSource& bound_net_log);
85 85
86 // Constructing for the "Save Page As..." feature: 86 // Constructing for the "Save Page As..." feature:
87 // |bound_net_log| is constructed externally for our use. 87 // |bound_net_log| is constructed externally for our use.
88 DownloadItemImpl( 88 DownloadItemImpl(
89 DownloadItemImplDelegate* delegate, 89 DownloadItemImplDelegate* delegate,
90 uint32_t id, 90 uint32_t id,
91 const base::FilePath& path, 91 const base::FilePath& path,
92 const GURL& url, 92 const GURL& url,
93 const std::string& mime_type, 93 const std::string& mime_type,
94 std::unique_ptr<DownloadRequestHandleInterface> request_handle, 94 std::unique_ptr<DownloadRequestHandleInterface> request_handle,
95 const net::BoundNetLog& bound_net_log); 95 const net::NetLogWithSource& bound_net_log);
96 96
97 ~DownloadItemImpl() override; 97 ~DownloadItemImpl() override;
98 98
99 // DownloadItem 99 // DownloadItem
100 void AddObserver(DownloadItem::Observer* observer) override; 100 void AddObserver(DownloadItem::Observer* observer) override;
101 void RemoveObserver(DownloadItem::Observer* observer) override; 101 void RemoveObserver(DownloadItem::Observer* observer) override;
102 void UpdateObservers() override; 102 void UpdateObservers() override;
103 void ValidateDangerousDownload() override; 103 void ValidateDangerousDownload() override;
104 void StealDangerousDownload(const AcquireFileCallback& callback) override; 104 void StealDangerousDownload(const AcquireFileCallback& callback) override;
105 void Pause() override; 105 void Pause() override;
(...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after
194 // Notify observers that this item is being removed by the user. 194 // Notify observers that this item is being removed by the user.
195 virtual void NotifyRemoved(); 195 virtual void NotifyRemoved();
196 196
197 virtual void OnDownloadedFileRemoved(); 197 virtual void OnDownloadedFileRemoved();
198 198
199 // Provide a weak pointer reference to a DownloadDestinationObserver 199 // Provide a weak pointer reference to a DownloadDestinationObserver
200 // for use by download destinations. 200 // for use by download destinations.
201 virtual base::WeakPtr<DownloadDestinationObserver> 201 virtual base::WeakPtr<DownloadDestinationObserver>
202 DestinationObserverAsWeakPtr(); 202 DestinationObserverAsWeakPtr();
203 203
204 // Get the download's BoundNetLog. 204 // Get the download's NetLogWithSource.
205 virtual const net::BoundNetLog& GetBoundNetLog() const; 205 virtual const net::NetLogWithSource& GetNetLogWithSource() const;
206 206
207 // DownloadItemImpl routines only needed by SavePackage ---------------------- 207 // DownloadItemImpl routines only needed by SavePackage ----------------------
208 208
209 // Called by SavePackage to set the total number of bytes on the item. 209 // Called by SavePackage to set the total number of bytes on the item.
210 virtual void SetTotalBytes(int64_t total_bytes); 210 virtual void SetTotalBytes(int64_t total_bytes);
211 211
212 virtual void OnAllDataSaved(int64_t total_bytes, 212 virtual void OnAllDataSaved(int64_t total_bytes,
213 std::unique_ptr<crypto::SecureHash> hash_state); 213 std::unique_ptr<crypto::SecureHash> hash_state);
214 214
215 // Called by SavePackage to display progress when the DownloadItem 215 // Called by SavePackage to display progress when the DownloadItem
(...skipping 451 matching lines...) Expand 10 before | Expand all | Expand 10 after
667 // in case it's needed for resumption. 667 // in case it's needed for resumption.
668 std::unique_ptr<crypto::SecureHash> hash_state_; 668 std::unique_ptr<crypto::SecureHash> hash_state_;
669 669
670 // Contents of the Last-Modified header for the most recent server response. 670 // Contents of the Last-Modified header for the most recent server response.
671 std::string last_modified_time_; 671 std::string last_modified_time_;
672 672
673 // Server's ETAG for the file. 673 // Server's ETAG for the file.
674 std::string etag_; 674 std::string etag_;
675 675
676 // Net log to use for this download. 676 // Net log to use for this download.
677 const net::BoundNetLog bound_net_log_; 677 const net::NetLogWithSource bound_net_log_;
678 678
679 base::WeakPtrFactory<DownloadItemImpl> weak_ptr_factory_; 679 base::WeakPtrFactory<DownloadItemImpl> weak_ptr_factory_;
680 680
681 DISALLOW_COPY_AND_ASSIGN(DownloadItemImpl); 681 DISALLOW_COPY_AND_ASSIGN(DownloadItemImpl);
682 }; 682 };
683 683
684 } // namespace content 684 } // namespace content
685 685
686 #endif // CONTENT_BROWSER_DOWNLOAD_DOWNLOAD_ITEM_IMPL_H_ 686 #endif // CONTENT_BROWSER_DOWNLOAD_DOWNLOAD_ITEM_IMPL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698