| OLD | NEW |
| 1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2006-2008 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/save_file.h" | 5 #include "chrome/browser/download/save_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/path_service.h" | 9 #include "base/path_service.h" |
| 10 #include "chrome/browser/save_types.h" | 10 #include "chrome/browser/download/save_types.h" |
| 11 #include "chrome/common/win_util.h" | 11 #include "chrome/common/win_util.h" |
| 12 #include "chrome/common/win_safe_util.h" | 12 #include "chrome/common/win_safe_util.h" |
| 13 | 13 |
| 14 SaveFile::SaveFile(const SaveFileCreateInfo* info) | 14 SaveFile::SaveFile(const SaveFileCreateInfo* info) |
| 15 : info_(info), | 15 : info_(info), |
| 16 file_(NULL), | 16 file_(NULL), |
| 17 bytes_so_far_(0), | 17 bytes_so_far_(0), |
| 18 path_renamed_(false), | 18 path_renamed_(false), |
| 19 in_progress_(true) { | 19 in_progress_(true) { |
| 20 DCHECK(info); | 20 DCHECK(info); |
| (...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 94 if (_wfopen_s(&file_, full_path_.c_str(), open_mode)) { | 94 if (_wfopen_s(&file_, full_path_.c_str(), open_mode)) { |
| 95 file_ = NULL; | 95 file_ = NULL; |
| 96 return false; | 96 return false; |
| 97 } | 97 } |
| 98 // Sets the zone to tell Windows that this file comes from the Internet. | 98 // Sets the zone to tell Windows that this file comes from the Internet. |
| 99 // We ignore the return value because a failure is not fatal. | 99 // We ignore the return value because a failure is not fatal. |
| 100 win_util::SetInternetZoneIdentifier(full_path_); | 100 win_util::SetInternetZoneIdentifier(full_path_); |
| 101 return true; | 101 return true; |
| 102 } | 102 } |
| 103 | 103 |
| OLD | NEW |