| OLD | NEW |
| 1 // Copyright (c) 2010 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 "chrome/browser/download/base_file.h" | 5 #include "chrome/browser/download/base_file.h" |
| 6 | 6 |
| 7 #include "base/file_util.h" | 7 #include "base/file_util.h" |
| 8 #include "base/logging.h" | 8 #include "base/logging.h" |
| 9 #include "base/stringprintf.h" | 9 #include "base/stringprintf.h" |
| 10 #include "base/third_party/nss/blapi.h" | 10 #include "base/third_party/nss/blapi.h" |
| 11 #include "base/third_party/nss/sha256.h" | 11 #include "base/third_party/nss/sha256.h" |
| 12 #include "net/base/file_stream.h" | 12 #include "net/base/file_stream.h" |
| 13 #include "net/base/net_errors.h" | 13 #include "net/base/net_errors.h" |
| 14 #include "chrome/browser/browser_thread.h" | 14 #include "chrome/browser/browser_thread.h" |
| 15 #include "chrome/browser/download/download_util.h" | 15 #include "chrome/browser/download/download_util.h" |
| 16 | 16 |
| 17 #if defined(OS_WIN) | 17 #if defined(OS_WIN) |
| 18 #include "app/win/win_util.h" | |
| 19 #include "chrome/common/win_safe_util.h" | 18 #include "chrome/common/win_safe_util.h" |
| 20 #elif defined(OS_MACOSX) | 19 #elif defined(OS_MACOSX) |
| 21 #include "chrome/browser/ui/cocoa/file_metadata.h" | 20 #include "chrome/browser/ui/cocoa/file_metadata.h" |
| 22 #endif | 21 #endif |
| 23 | 22 |
| 24 BaseFile::BaseFile(const FilePath& full_path, | 23 BaseFile::BaseFile(const FilePath& full_path, |
| 25 const GURL& source_url, | 24 const GURL& source_url, |
| 26 const GURL& referrer_url, | 25 const GURL& referrer_url, |
| 27 int64 received_bytes, | 26 int64 received_bytes, |
| 28 const linked_ptr<net::FileStream>& file_stream) | 27 const linked_ptr<net::FileStream>& file_stream) |
| (...skipping 199 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 228 file_stream_->Close(); | 227 file_stream_->Close(); |
| 229 file_stream_.reset(); | 228 file_stream_.reset(); |
| 230 } | 229 } |
| 231 } | 230 } |
| 232 | 231 |
| 233 std::string BaseFile::DebugString() const { | 232 std::string BaseFile::DebugString() const { |
| 234 return base::StringPrintf("{ source_url_ = \"%s\" full_path_ = \"%s\" }", | 233 return base::StringPrintf("{ source_url_ = \"%s\" full_path_ = \"%s\" }", |
| 235 source_url_.spec().c_str(), | 234 source_url_.spec().c_str(), |
| 236 full_path_.value().c_str()); | 235 full_path_.value().c_str()); |
| 237 } | 236 } |
| OLD | NEW |