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_DOWNLOAD_FILE_IMPL_H_ | 5 #ifndef CONTENT_BROWSER_DOWNLOAD_DOWNLOAD_FILE_IMPL_H_ |
6 #define CONTENT_BROWSER_DOWNLOAD_DOWNLOAD_FILE_IMPL_H_ | 6 #define CONTENT_BROWSER_DOWNLOAD_DOWNLOAD_FILE_IMPL_H_ |
7 | 7 |
8 #include "content/browser/download/download_file.h" | 8 #include "content/browser/download/download_file.h" |
9 | 9 |
10 #include "base/memory/ref_counted.h" | 10 #include "base/memory/ref_counted.h" |
(...skipping 29 matching lines...) Expand all Loading... |
40 const GURL& url, | 40 const GURL& url, |
41 const GURL& referrer_url, | 41 const GURL& referrer_url, |
42 bool calculate_hash, | 42 bool calculate_hash, |
43 scoped_ptr<ByteStreamReader> stream, | 43 scoped_ptr<ByteStreamReader> stream, |
44 const net::BoundNetLog& bound_net_log, | 44 const net::BoundNetLog& bound_net_log, |
45 base::WeakPtr<DownloadDestinationObserver> observer); | 45 base::WeakPtr<DownloadDestinationObserver> observer); |
46 | 46 |
47 virtual ~DownloadFileImpl(); | 47 virtual ~DownloadFileImpl(); |
48 | 48 |
49 // DownloadFile functions. | 49 // DownloadFile functions. |
50 virtual void Initialize(const InitializeCallback& callback) OVERRIDE; | 50 virtual void Initialize(const InitializeCallback& callback) override; |
51 virtual void RenameAndUniquify( | 51 virtual void RenameAndUniquify( |
52 const base::FilePath& full_path, | 52 const base::FilePath& full_path, |
53 const RenameCompletionCallback& callback) OVERRIDE; | 53 const RenameCompletionCallback& callback) override; |
54 virtual void RenameAndAnnotate( | 54 virtual void RenameAndAnnotate( |
55 const base::FilePath& full_path, | 55 const base::FilePath& full_path, |
56 const RenameCompletionCallback& callback) OVERRIDE; | 56 const RenameCompletionCallback& callback) override; |
57 virtual void Detach() OVERRIDE; | 57 virtual void Detach() override; |
58 virtual void Cancel() OVERRIDE; | 58 virtual void Cancel() override; |
59 virtual base::FilePath FullPath() const OVERRIDE; | 59 virtual base::FilePath FullPath() const override; |
60 virtual bool InProgress() const OVERRIDE; | 60 virtual bool InProgress() const override; |
61 virtual int64 CurrentSpeed() const OVERRIDE; | 61 virtual int64 CurrentSpeed() const override; |
62 virtual bool GetHash(std::string* hash) OVERRIDE; | 62 virtual bool GetHash(std::string* hash) override; |
63 virtual std::string GetHashState() OVERRIDE; | 63 virtual std::string GetHashState() override; |
64 virtual void SetClientGuid(const std::string& guid) OVERRIDE; | 64 virtual void SetClientGuid(const std::string& guid) override; |
65 | 65 |
66 protected: | 66 protected: |
67 // For test class overrides. | 67 // For test class overrides. |
68 virtual DownloadInterruptReason AppendDataToFile( | 68 virtual DownloadInterruptReason AppendDataToFile( |
69 const char* data, size_t data_len); | 69 const char* data, size_t data_len); |
70 | 70 |
71 virtual base::TimeDelta GetRetryDelayForFailedRename(int attempt_number); | 71 virtual base::TimeDelta GetRetryDelayForFailedRename(int attempt_number); |
72 | 72 |
73 virtual bool ShouldRetryFailedRename(DownloadInterruptReason reason); | 73 virtual bool ShouldRetryFailedRename(DownloadInterruptReason reason); |
74 | 74 |
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
131 base::WeakPtr<DownloadDestinationObserver> observer_; | 131 base::WeakPtr<DownloadDestinationObserver> observer_; |
132 | 132 |
133 base::WeakPtrFactory<DownloadFileImpl> weak_factory_; | 133 base::WeakPtrFactory<DownloadFileImpl> weak_factory_; |
134 | 134 |
135 DISALLOW_COPY_AND_ASSIGN(DownloadFileImpl); | 135 DISALLOW_COPY_AND_ASSIGN(DownloadFileImpl); |
136 }; | 136 }; |
137 | 137 |
138 } // namespace content | 138 } // namespace content |
139 | 139 |
140 #endif // CONTENT_BROWSER_DOWNLOAD_DOWNLOAD_FILE_IMPL_H_ | 140 #endif // CONTENT_BROWSER_DOWNLOAD_DOWNLOAD_FILE_IMPL_H_ |
OLD | NEW |