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

Unified Diff: content/browser/download/download_item_impl.h

Issue 9121053: Added net logging to DownloadItem. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Merged with parent Created 8 years, 11 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 side-by-side diff with in-line comments
Download patch
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..1a8f777b9bdbec8b8cd4cb8f143037954bac1916 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,
+ const net::BoundNetLog& bound_net_log);
// Constructing for a regular download.
Randy Smith (Not in Mondays) 2012/02/05 23:49:15 Willing to put a comment in as to where the BoundN
ahendrickson 2012/02/06 21:39:20 Done.
Randy Smith (Not in Mondays) 2012/02/07 15:09:45 I think the fact that we're passing in NetLog's el
ahendrickson 2012/02/07 17:18:35 OK
// 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,
+ const net::BoundNetLog& bound_net_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.
+ const net::BoundNetLog bound_net_log_;
+
DISALLOW_COPY_AND_ASSIGN(DownloadItemImpl);
};

Powered by Google App Engine
This is Rietveld 408576698