OLD | NEW |
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 "chrome/browser/download/base_file.h" | 5 #include "chrome/browser/download/base_file.h" |
6 | 6 |
7 #include "base/crypto/secure_hash.h" | 7 #include "base/crypto/secure_hash.h" |
8 #include "base/file_util.h" | 8 #include "base/file_util.h" |
9 #include "base/logging.h" | 9 #include "base/logging.h" |
10 #include "base/stringprintf.h" | 10 #include "base/stringprintf.h" |
11 #include "net/base/file_stream.h" | 11 #include "net/base/file_stream.h" |
12 #include "net/base/net_errors.h" | 12 #include "net/base/net_errors.h" |
13 #include "chrome/browser/browser_thread.h" | |
14 #include "chrome/browser/download/download_util.h" | 13 #include "chrome/browser/download/download_util.h" |
| 14 #include "content/browser/browser_thread.h" |
15 | 15 |
16 #if defined(OS_WIN) | 16 #if defined(OS_WIN) |
17 #include "chrome/common/win_safe_util.h" | 17 #include "chrome/common/win_safe_util.h" |
18 #elif defined(OS_MACOSX) | 18 #elif defined(OS_MACOSX) |
19 #include "chrome/browser/ui/cocoa/file_metadata.h" | 19 #include "chrome/browser/ui/cocoa/file_metadata.h" |
20 #endif | 20 #endif |
21 | 21 |
22 BaseFile::BaseFile(const FilePath& full_path, | 22 BaseFile::BaseFile(const FilePath& full_path, |
23 const GURL& source_url, | 23 const GURL& source_url, |
24 const GURL& referrer_url, | 24 const GURL& referrer_url, |
(...skipping 191 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
216 file_stream_->Close(); | 216 file_stream_->Close(); |
217 file_stream_.reset(); | 217 file_stream_.reset(); |
218 } | 218 } |
219 } | 219 } |
220 | 220 |
221 std::string BaseFile::DebugString() const { | 221 std::string BaseFile::DebugString() const { |
222 return base::StringPrintf("{ source_url_ = \"%s\" full_path_ = \"%s\" }", | 222 return base::StringPrintf("{ source_url_ = \"%s\" full_path_ = \"%s\" }", |
223 source_url_.spec().c_str(), | 223 source_url_.spec().c_str(), |
224 full_path_.value().c_str()); | 224 full_path_.value().c_str()); |
225 } | 225 } |
OLD | NEW |