| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include "content/browser/download/download_file.h" | 9 #include "content/browser/download/download_file.h" |
| 10 | 10 |
| (...skipping 21 matching lines...) Expand all Loading... |
| 32 size_t data_len) OVERRIDE; | 32 size_t data_len) OVERRIDE; |
| 33 virtual net::Error Rename(const FilePath& full_path) OVERRIDE; | 33 virtual net::Error Rename(const FilePath& full_path) OVERRIDE; |
| 34 virtual void Detach() OVERRIDE; | 34 virtual void Detach() OVERRIDE; |
| 35 virtual void Cancel() OVERRIDE; | 35 virtual void Cancel() OVERRIDE; |
| 36 virtual void Finish() OVERRIDE; | 36 virtual void Finish() OVERRIDE; |
| 37 virtual void AnnotateWithSourceInformation() OVERRIDE; | 37 virtual void AnnotateWithSourceInformation() OVERRIDE; |
| 38 virtual FilePath FullPath() const OVERRIDE; | 38 virtual FilePath FullPath() const OVERRIDE; |
| 39 virtual bool InProgress() const OVERRIDE; | 39 virtual bool InProgress() const OVERRIDE; |
| 40 virtual int64 BytesSoFar() const OVERRIDE; | 40 virtual int64 BytesSoFar() const OVERRIDE; |
| 41 virtual bool GetSha256Hash(std::string* hash) OVERRIDE; | 41 virtual bool GetSha256Hash(std::string* hash) OVERRIDE; |
| 42 virtual std::string GetSha256HashState() OVERRIDE; |
| 43 virtual bool SetSha256HashState(const std::string& hash_state) OVERRIDE; |
| 42 virtual void CancelDownloadRequest() OVERRIDE; | 44 virtual void CancelDownloadRequest() OVERRIDE; |
| 43 virtual int Id() const OVERRIDE; | 45 virtual int Id() const OVERRIDE; |
| 44 virtual DownloadManager* GetDownloadManager() OVERRIDE; | 46 virtual DownloadManager* GetDownloadManager() OVERRIDE; |
| 45 virtual const DownloadId& GlobalId() const OVERRIDE; | 47 virtual const DownloadId& GlobalId() const OVERRIDE; |
| 46 virtual std::string DebugString() const OVERRIDE; | 48 virtual std::string DebugString() const OVERRIDE; |
| 47 | 49 |
| 48 private: | 50 private: |
| 49 // The base file instance. | 51 // The base file instance. |
| 50 BaseFile file_; | 52 BaseFile file_; |
| 51 | 53 |
| 52 // The unique identifier for this download, assigned at creation by | 54 // The unique identifier for this download, assigned at creation by |
| 53 // the DownloadFileManager for its internal record keeping. | 55 // the DownloadFileManager for its internal record keeping. |
| 54 DownloadId id_; | 56 DownloadId id_; |
| 55 | 57 |
| 56 // The handle to the request information. Used for operations outside the | 58 // The handle to the request information. Used for operations outside the |
| 57 // download system, specifically canceling a download. | 59 // download system, specifically canceling a download. |
| 58 scoped_ptr<DownloadRequestHandleInterface> request_handle_; | 60 scoped_ptr<DownloadRequestHandleInterface> request_handle_; |
| 59 | 61 |
| 60 // DownloadManager this download belongs to. | 62 // DownloadManager this download belongs to. |
| 61 scoped_refptr<DownloadManager> download_manager_; | 63 scoped_refptr<DownloadManager> download_manager_; |
| 62 | 64 |
| 63 DISALLOW_COPY_AND_ASSIGN(DownloadFileImpl); | 65 DISALLOW_COPY_AND_ASSIGN(DownloadFileImpl); |
| 64 }; | 66 }; |
| 65 | 67 |
| 66 #endif // CONTENT_BROWSER_DOWNLOAD_DOWNLOAD_FILE_IMPL_H_ | 68 #endif // CONTENT_BROWSER_DOWNLOAD_DOWNLOAD_FILE_IMPL_H_ |
| OLD | NEW |