| 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_item.h" | 5 #include "chrome/browser/download/save_item.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/string_util.h" | 9 #include "base/string_util.h" |
| 10 #include "base/win_util.h" | 10 #include "base/win_util.h" |
| 11 #include "chrome/browser/save_file.h" | 11 #include "chrome/browser/download/save_file.h" |
| 12 #include "chrome/browser/save_file_manager.h" | 12 #include "chrome/browser/download/save_file_manager.h" |
| 13 #include "chrome/browser/save_package.h" | 13 #include "chrome/browser/download/save_package.h" |
| 14 | 14 |
| 15 // Constructor for SaveItem when creating each saving job. | 15 // Constructor for SaveItem when creating each saving job. |
| 16 SaveItem::SaveItem(const std::wstring& url, | 16 SaveItem::SaveItem(const std::wstring& url, |
| 17 const std::wstring& referrer, | 17 const std::wstring& referrer, |
| 18 SavePackage* package, | 18 SavePackage* package, |
| 19 SaveFileCreateInfo::SaveFileSource save_source) | 19 SaveFileCreateInfo::SaveFileSource save_source) |
| 20 : save_id_(-1), | 20 : save_id_(-1), |
| 21 save_source_(save_source), | 21 save_source_(save_source), |
| 22 url_(url), | 22 url_(url), |
| 23 referrer_(referrer), | 23 referrer_(referrer), |
| (...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 123 void SaveItem::SetSaveId(int32 save_id) { | 123 void SaveItem::SetSaveId(int32 save_id) { |
| 124 DCHECK(save_id_ == -1); | 124 DCHECK(save_id_ == -1); |
| 125 save_id_ = save_id; | 125 save_id_ = save_id; |
| 126 } | 126 } |
| 127 | 127 |
| 128 void SaveItem::SetTotalBytes(int64 total_bytes) { | 128 void SaveItem::SetTotalBytes(int64 total_bytes) { |
| 129 DCHECK(total_bytes_ == 0); | 129 DCHECK(total_bytes_ == 0); |
| 130 total_bytes_ = total_bytes; | 130 total_bytes_ = total_bytes; |
| 131 } | 131 } |
| 132 | 132 |
| OLD | NEW |