summaryrefslogtreecommitdiffstats
path: root/content
diff options
context:
space:
mode:
authorahendrickson@chromium.org <ahendrickson@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-02-02 18:49:43 +0000
committerahendrickson@chromium.org <ahendrickson@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-02-02 18:49:43 +0000
commit1034299e794d0ba846309c43046eb8bb8a740e27 (patch)
tree9844e4cfd15857aa0d772432f8cd01983bc1df56 /content
parente5eed6d9790191c9ce4705167d1bb1166d521699 (diff)
downloadchromium_src-1034299e794d0ba846309c43046eb8bb8a740e27.zip
chromium_src-1034299e794d0ba846309c43046eb8bb8a740e27.tar.gz
chromium_src-1034299e794d0ba846309c43046eb8bb8a740e27.tar.bz2
Added Net logging to FileStream.
The net logging doesn't currently do anything, but is ready if some system wants to pass it in. This is the first of 4 CLs that will enable net logging for downloads. BUG=None TEST=None Review URL: https://chromiumcodereview.appspot.com/9288084 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@120226 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'content')
-rw-r--r--content/browser/download/base_file.cc2
-rw-r--r--content/browser/download/base_file_unittest.cc4
-rw-r--r--content/browser/download/download_manager_impl_unittest.cc2
-rw-r--r--content/browser/download/drag_download_util.cc2
-rw-r--r--content/browser/renderer_host/redirect_to_file_resource_handler.cc3
5 files changed, 7 insertions, 6 deletions
diff --git a/content/browser/download/base_file.cc b/content/browser/download/base_file.cc
index b346ef2..a9da47f 100644
--- a/content/browser/download/base_file.cc
+++ b/content/browser/download/base_file.cc
@@ -449,7 +449,7 @@ void BaseFile::AnnotateWithSourceInformation() {
}
void BaseFile::CreateFileStream() {
- file_stream_.reset(new net::FileStream);
+ file_stream_.reset(new net::FileStream(NULL));
}
net::Error BaseFile::Open() {
diff --git a/content/browser/download/base_file_unittest.cc b/content/browser/download/base_file_unittest.cc
index 911af194..646ef00 100644
--- a/content/browser/download/base_file_unittest.cc
+++ b/content/browser/download/base_file_unittest.cc
@@ -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.
@@ -108,7 +108,7 @@ class BaseFileTest : public testing::Test {
return false;
// Create a new file stream.
- mock_file_stream_.reset(new net::testing::MockFileStream);
+ mock_file_stream_.reset(new net::testing::MockFileStream(NULL));
if (mock_file_stream_->Open(
path,
base::PLATFORM_FILE_OPEN_ALWAYS | base::PLATFORM_FILE_WRITE) != 0) {
diff --git a/content/browser/download/download_manager_impl_unittest.cc b/content/browser/download/download_manager_impl_unittest.cc
index ae1ada7..6a15281 100644
--- a/content/browser/download/download_manager_impl_unittest.cc
+++ b/content/browser/download/download_manager_impl_unittest.cc
@@ -1010,7 +1010,7 @@ TEST_F(DownloadManagerTest, MAYBE_DownloadFileErrorTest) {
ASSERT_TRUE(file_util::CreateTemporaryFile(&path));
// This file stream will be used, until the first rename occurs.
- net::FileStream* stream = new net::FileStream;
+ net::FileStream* stream = new net::FileStream(NULL);
ASSERT_EQ(0, stream->Open(
path,
base::PLATFORM_FILE_OPEN_ALWAYS | base::PLATFORM_FILE_WRITE));
diff --git a/content/browser/download/drag_download_util.cc b/content/browser/download/drag_download_util.cc
index a0d6f8a..ed781bb 100644
--- a/content/browser/download/drag_download_util.cc
+++ b/content/browser/download/drag_download_util.cc
@@ -59,7 +59,7 @@ bool ParseDownloadMetadata(const string16& metadata,
FileStream* CreateFileStreamForDrop(FilePath* file_path) {
DCHECK(file_path && !file_path->empty());
- scoped_ptr<FileStream> file_stream(new FileStream);
+ scoped_ptr<FileStream> file_stream(new FileStream(NULL));
const int kMaxSeq = 99;
for (int seq = 0; seq <= kMaxSeq; seq++) {
FilePath new_file_path;
diff --git a/content/browser/renderer_host/redirect_to_file_resource_handler.cc b/content/browser/renderer_host/redirect_to_file_resource_handler.cc
index 54329db..e4147f0 100644
--- a/content/browser/renderer_host/redirect_to_file_resource_handler.cc
+++ b/content/browser/renderer_host/redirect_to_file_resource_handler.cc
@@ -164,7 +164,8 @@ void RedirectToFileResourceHandler::DidCreateTemporaryFile(
BrowserThread::GetMessageLoopProxyForThread(BrowserThread::FILE));
file_stream_.reset(new net::FileStream(file_handle.ReleaseValue(),
base::PLATFORM_FILE_WRITE |
- base::PLATFORM_FILE_ASYNC));
+ base::PLATFORM_FILE_ASYNC,
+ NULL));
host_->RegisterDownloadedTempFile(
process_id_, request_id_, deletable_file_.get());
host_->StartDeferredRequest(process_id_, request_id_);