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 #ifndef CONTENT_BROWSER_DOWNLOAD_BASE_FILE_H_ | 5 #ifndef CONTENT_BROWSER_DOWNLOAD_BASE_FILE_H_ |
6 #define CONTENT_BROWSER_DOWNLOAD_BASE_FILE_H_ | 6 #define CONTENT_BROWSER_DOWNLOAD_BASE_FILE_H_ |
7 | 7 |
8 #include <stddef.h> | 8 #include <stddef.h> |
9 #include <stdint.h> | 9 #include <stdint.h> |
10 | 10 |
11 #include <memory> | 11 #include <memory> |
12 #include <string> | 12 #include <string> |
13 | 13 |
14 #include "base/files/file.h" | 14 #include "base/files/file.h" |
15 #include "base/files/file_path.h" | 15 #include "base/files/file_path.h" |
16 #include "base/gtest_prod_util.h" | 16 #include "base/gtest_prod_util.h" |
17 #include "base/logging.h" | 17 #include "base/logging.h" |
18 #include "base/macros.h" | 18 #include "base/macros.h" |
19 #include "base/memory/linked_ptr.h" | 19 #include "base/memory/linked_ptr.h" |
20 #include "base/time/time.h" | 20 #include "base/time/time.h" |
21 #include "content/common/content_export.h" | 21 #include "content/common/content_export.h" |
22 #include "content/public/browser/download_interrupt_reasons.h" | 22 #include "content/public/browser/download_interrupt_reasons.h" |
23 #include "crypto/secure_hash.h" | 23 #include "crypto/secure_hash.h" |
24 #include "net/base/net_errors.h" | 24 #include "net/base/net_errors.h" |
25 #include "net/log/net_log.h" | 25 #include "net/log/net_log_with_source.h" |
26 #include "url/gurl.h" | 26 #include "url/gurl.h" |
27 | 27 |
28 namespace content { | 28 namespace content { |
29 | 29 |
30 // File being downloaded and saved to disk. This is a base class | 30 // File being downloaded and saved to disk. This is a base class |
31 // for DownloadFile and SaveFile, which keep more state information. BaseFile | 31 // for DownloadFile and SaveFile, which keep more state information. BaseFile |
32 // considers itself the owner of the physical file and will delete it when the | 32 // considers itself the owner of the physical file and will delete it when the |
33 // BaseFile object is destroyed unless the ownership is revoked via a call to | 33 // BaseFile object is destroyed unless the ownership is revoked via a call to |
34 // Detach(). | 34 // Detach(). |
35 class CONTENT_EXPORT BaseFile { | 35 class CONTENT_EXPORT BaseFile { |
(...skipping 188 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
224 bool detached_ = false; | 224 bool detached_ = false; |
225 | 225 |
226 net::NetLogWithSource net_log_; | 226 net::NetLogWithSource net_log_; |
227 | 227 |
228 DISALLOW_COPY_AND_ASSIGN(BaseFile); | 228 DISALLOW_COPY_AND_ASSIGN(BaseFile); |
229 }; | 229 }; |
230 | 230 |
231 } // namespace content | 231 } // namespace content |
232 | 232 |
233 #endif // CONTENT_BROWSER_DOWNLOAD_BASE_FILE_H_ | 233 #endif // CONTENT_BROWSER_DOWNLOAD_BASE_FILE_H_ |
OLD | NEW |