Chromium Code Reviews| Index: content/browser/download/download_item_impl.h |
| diff --git a/content/browser/download/download_item_impl.h b/content/browser/download/download_item_impl.h |
| index c3d31194af18f77940b72b1a2d80afaaca7890d5..9136159430567bd5b4e08f46fd85f876fa8729f8 100644 |
| --- a/content/browser/download/download_item_impl.h |
| +++ b/content/browser/download/download_item_impl.h |
| @@ -1,4 +1,4 @@ |
| -// Copyright (c) 2011 The Chromium Authors. All rights reserved. |
| +// Copyright (c) 2012 The Chromium Authors. All rights reserved. |
| // Use of this source code is governed by a BSD-style license that can be |
| // found in the LICENSE file. |
| @@ -14,12 +14,14 @@ |
| #include "base/observer_list.h" |
| #include "base/time.h" |
| #include "base/timer.h" |
| +#include "content/browser/download/download_net_log_parameters.h" |
| #include "content/browser/download/download_request_handle.h" |
| #include "content/common/content_export.h" |
| #include "content/public/browser/download_id.h" |
| #include "content/public/browser/download_item.h" |
| #include "googleurl/src/gurl.h" |
| #include "net/base/net_errors.h" |
| +#include "net/base/net_log.h" |
| // See download_item.h for usage. |
| @@ -83,7 +85,8 @@ class CONTENT_EXPORT DownloadItemImpl : public content::DownloadItem { |
| // Constructing from persistent store: |
| DownloadItemImpl(Delegate* delegate, |
| content::DownloadId download_id, |
| - const DownloadPersistentStoreInfo& info); |
| + const DownloadPersistentStoreInfo& info, |
| + net::NetLog* log); |
|
mmenke
2012/02/03 17:59:45
nit: net_log. Below, too
Randy Smith (Not in Mondays)
2012/02/03 18:23:37
I'm somewhat uncomfortable with having different w
ahendrickson
2012/02/04 05:24:04
Done.
ahendrickson
2012/02/04 05:24:04
Two of the constructors now take BoundNetLogs, and
|
| // Constructing for a regular download. |
| // Takes ownership of the object pointed to by |request_handle|. |
| @@ -97,7 +100,8 @@ class CONTENT_EXPORT DownloadItemImpl : public content::DownloadItem { |
| const FilePath& path, |
| const GURL& url, |
| bool is_otr, |
| - content::DownloadId download_id); |
| + content::DownloadId download_id, |
| + net::NetLog* log); |
| virtual ~DownloadItemImpl(); |
| @@ -204,7 +208,9 @@ class CONTENT_EXPORT DownloadItemImpl : public content::DownloadItem { |
| private: |
| // Construction common to all constructors. |active| should be true for new |
| // downloads and false for downloads from the history. |
| - void Init(bool active); |
| + // |download_type| indicates to the net log system what kind of download |
| + // this is. |
| + void Init(bool active, download_net_logs::DownloadType download_type); |
| // Internal helper for maintaining consistent received and total sizes, and |
| // hash state. |
| @@ -371,6 +377,9 @@ class CONTENT_EXPORT DownloadItemImpl : public content::DownloadItem { |
| // are owned by the DownloadItemImpl. |
| std::map<const void*, ExternalData*> external_data_map_; |
| + // Net log to use for this download. |
| + net::BoundNetLog bound_net_log_; |
|
mmenke
2012/02/03 17:59:45
nit: const
ahendrickson
2012/02/04 05:24:04
Done.
|
| + |
| DISALLOW_COPY_AND_ASSIGN(DownloadItemImpl); |
| }; |