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

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

Issue 6023006: Add support to sha256 hash the downloaded file.... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 9 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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 "chrome/browser/download/save_file.h" 5 #include "chrome/browser/download/save_file.h"
6 6
7 #include "base/logging.h" 7 #include "base/logging.h"
8 #include "chrome/browser/browser_thread.h" 8 #include "chrome/browser/browser_thread.h"
9 #include "net/base/file_stream.h" 9 #include "net/base/file_stream.h"
10 10
11 SaveFile::SaveFile(const SaveFileCreateInfo* info) 11 SaveFile::SaveFile(const SaveFileCreateInfo* info)
12 : BaseFile(FilePath(), info->url, GURL(), 0, linked_ptr<net::FileStream>()), 12 : BaseFile(FilePath(), info->url, GURL(), 0, linked_ptr<net::FileStream>(),
13 false /* no sha256 hash needed for "save as" operation */),
13 info_(info) { 14 info_(info) {
14 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::FILE)); 15 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::FILE));
15 16
16 DCHECK(info); 17 DCHECK(info);
17 DCHECK(info->path.empty()); 18 DCHECK(info->path.empty());
18 } 19 }
19 20
20 SaveFile::~SaveFile() { 21 SaveFile::~SaveFile() {
21 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::FILE)); 22 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::FILE));
22 } 23 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698