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

Side by Side Diff: content/browser/download/save_file.cc

Issue 9223019: Added net logging to BaseFile. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Minor cleanup Created 8 years, 10 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2011 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 #include "content/browser/download/save_file.h" 5 #include "content/browser/download/save_file.h"
6 6
7 #include "base/logging.h" 7 #include "base/logging.h"
8 #include "content/public/browser/browser_thread.h" 8 #include "content/public/browser/browser_thread.h"
9 #include "net/base/file_stream.h" 9 #include "net/base/file_stream.h"
10 10
11 using content::BrowserThread; 11 using content::BrowserThread;
12 12
13 SaveFile::SaveFile(const SaveFileCreateInfo* info, bool calculate_hash) 13 SaveFile::SaveFile(const SaveFileCreateInfo* info, bool calculate_hash)
14 : file_(FilePath(), 14 : file_(FilePath(),
15 info->url, 15 info->url,
16 GURL(), 16 GURL(),
17 0, 17 0,
18 calculate_hash, 18 calculate_hash,
19 "", 19 "",
20 linked_ptr<net::FileStream>()), 20 linked_ptr<net::FileStream>(),
21 net::BoundNetLog()),
21 info_(info) { 22 info_(info) {
22 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::FILE)); 23 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::FILE));
23 24
24 DCHECK(info); 25 DCHECK(info);
25 DCHECK(info->path.empty()); 26 DCHECK(info->path.empty());
26 } 27 }
27 28
28 SaveFile::~SaveFile() { 29 SaveFile::~SaveFile() {
29 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::FILE)); 30 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::FILE));
30 } 31 }
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
69 return file_.bytes_so_far(); 70 return file_.bytes_so_far();
70 } 71 }
71 72
72 bool SaveFile::GetHash(std::string* hash) { 73 bool SaveFile::GetHash(std::string* hash) {
73 return file_.GetHash(hash); 74 return file_.GetHash(hash);
74 } 75 }
75 76
76 std::string SaveFile::DebugString() const { 77 std::string SaveFile::DebugString() const {
77 return file_.DebugString(); 78 return file_.DebugString();
78 } 79 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698