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

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

Issue 8404049: Added member data to classes to support download resumption. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rearranged structures for greater consistency. Created 9 years, 1 month 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) 2011 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) 13 SaveFile::SaveFile(const SaveFileCreateInfo* info)
14 : file_(FilePath(), info->url, GURL(), 0, linked_ptr<net::FileStream>()), 14 : file_(FilePath(),
15 info->url,
16 GURL(),
17 0,
18 "",
19 linked_ptr<net::FileStream>()),
15 info_(info) { 20 info_(info) {
16 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::FILE)); 21 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::FILE));
17 22
18 DCHECK(info); 23 DCHECK(info);
19 DCHECK(info->path.empty()); 24 DCHECK(info->path.empty());
20 } 25 }
21 26
22 SaveFile::~SaveFile() { 27 SaveFile::~SaveFile() {
23 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::FILE)); 28 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::FILE));
24 } 29 }
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
63 return file_.bytes_so_far(); 68 return file_.bytes_so_far();
64 } 69 }
65 70
66 bool SaveFile::GetSha256Hash(std::string* hash) { 71 bool SaveFile::GetSha256Hash(std::string* hash) {
67 return file_.GetSha256Hash(hash); 72 return file_.GetSha256Hash(hash);
68 } 73 }
69 74
70 std::string SaveFile::DebugString() const { 75 std::string SaveFile::DebugString() const {
71 return file_.DebugString(); 76 return file_.DebugString();
72 } 77 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698