OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 "content/browser/download/save_file.h" | 5 #include "content/browser/download/save_file.h" |
6 | 6 |
7 #include "base/logging.h" | 7 #include "base/logging.h" |
8 #include "content/public/browser/browser_thread.h" | 8 #include "content/public/browser/browser_thread.h" |
9 #include "net/base/file_stream.h" | 9 #include "net/base/file_stream.h" |
10 | 10 |
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
53 | 53 |
54 void SaveFile::Cancel() { | 54 void SaveFile::Cancel() { |
55 file_.Cancel(); | 55 file_.Cancel(); |
56 } | 56 } |
57 | 57 |
58 void SaveFile::Finish() { | 58 void SaveFile::Finish() { |
59 file_.Finish(); | 59 file_.Finish(); |
60 } | 60 } |
61 | 61 |
62 void SaveFile::AnnotateWithSourceInformation() { | 62 void SaveFile::AnnotateWithSourceInformation() { |
| 63 // TODO(gbillock): If this method is called, it should set the |
| 64 // file_.SetClientGuid() method first. |
63 file_.AnnotateWithSourceInformation(); | 65 file_.AnnotateWithSourceInformation(); |
64 } | 66 } |
65 | 67 |
66 base::FilePath SaveFile::FullPath() const { | 68 base::FilePath SaveFile::FullPath() const { |
67 return file_.full_path(); | 69 return file_.full_path(); |
68 } | 70 } |
69 | 71 |
70 bool SaveFile::InProgress() const { | 72 bool SaveFile::InProgress() const { |
71 return file_.in_progress(); | 73 return file_.in_progress(); |
72 } | 74 } |
73 | 75 |
74 int64 SaveFile::BytesSoFar() const { | 76 int64 SaveFile::BytesSoFar() const { |
75 return file_.bytes_so_far(); | 77 return file_.bytes_so_far(); |
76 } | 78 } |
77 | 79 |
78 bool SaveFile::GetHash(std::string* hash) { | 80 bool SaveFile::GetHash(std::string* hash) { |
79 return file_.GetHash(hash); | 81 return file_.GetHash(hash); |
80 } | 82 } |
81 | 83 |
82 std::string SaveFile::DebugString() const { | 84 std::string SaveFile::DebugString() const { |
83 return file_.DebugString(); | 85 return file_.DebugString(); |
84 } | 86 } |
85 | 87 |
86 } // namespace content | 88 } // namespace content |
OLD | NEW |