| 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_MOCK_DOWNLOAD_FILE_H_ | 5 #ifndef CONTENT_BROWSER_DOWNLOAD_MOCK_DOWNLOAD_FILE_H_ |
| 6 #define CONTENT_BROWSER_DOWNLOAD_MOCK_DOWNLOAD_FILE_H_ | 6 #define CONTENT_BROWSER_DOWNLOAD_MOCK_DOWNLOAD_FILE_H_ |
| 7 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include <string> | 9 #include <string> |
| 10 #include <map> | 10 #include <map> |
| (...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 67 size_t data_len) OVERRIDE; | 67 size_t data_len) OVERRIDE; |
| 68 virtual net::Error Rename(const FilePath& full_path) OVERRIDE; | 68 virtual net::Error Rename(const FilePath& full_path) OVERRIDE; |
| 69 virtual void Detach() OVERRIDE; | 69 virtual void Detach() OVERRIDE; |
| 70 virtual void Cancel() OVERRIDE; | 70 virtual void Cancel() OVERRIDE; |
| 71 virtual void Finish() OVERRIDE; | 71 virtual void Finish() OVERRIDE; |
| 72 virtual void AnnotateWithSourceInformation() OVERRIDE; | 72 virtual void AnnotateWithSourceInformation() OVERRIDE; |
| 73 virtual FilePath FullPath() const OVERRIDE; | 73 virtual FilePath FullPath() const OVERRIDE; |
| 74 virtual bool InProgress() const OVERRIDE; | 74 virtual bool InProgress() const OVERRIDE; |
| 75 virtual int64 BytesSoFar() const OVERRIDE; | 75 virtual int64 BytesSoFar() const OVERRIDE; |
| 76 virtual bool GetSha256Hash(std::string* hash) OVERRIDE; | 76 virtual bool GetSha256Hash(std::string* hash) OVERRIDE; |
| 77 virtual std::string GetSha256HashState() OVERRIDE; |
| 78 virtual bool SetSha256HashState(const std::string& hash_state) OVERRIDE; |
| 77 virtual void CancelDownloadRequest() OVERRIDE; | 79 virtual void CancelDownloadRequest() OVERRIDE; |
| 78 virtual int Id() const OVERRIDE; | 80 virtual int Id() const OVERRIDE; |
| 79 virtual DownloadManager* GetDownloadManager() OVERRIDE; | 81 virtual DownloadManager* GetDownloadManager() OVERRIDE; |
| 80 virtual const DownloadId& GlobalId() const OVERRIDE; | 82 virtual const DownloadId& GlobalId() const OVERRIDE; |
| 81 virtual std::string DebugString() const OVERRIDE; | 83 virtual std::string DebugString() const OVERRIDE; |
| 82 | 84 |
| 83 // Functions relating to setting and checking expectations. | 85 // Functions relating to setting and checking expectations. |
| 84 size_t rename_count() const { return rename_count_; } | 86 size_t rename_count() const { return rename_count_; } |
| 85 void SetExpectedPath(size_t index, const FilePath& path); | 87 void SetExpectedPath(size_t index, const FilePath& path); |
| 86 | 88 |
| (...skipping 20 matching lines...) Expand all Loading... |
| 107 std::vector<FilePath> expected_rename_path_list_; | 109 std::vector<FilePath> expected_rename_path_list_; |
| 108 | 110 |
| 109 // A buffer to hold the data we write. | 111 // A buffer to hold the data we write. |
| 110 std::string data_; | 112 std::string data_; |
| 111 | 113 |
| 112 // Dummy in-progress flag. | 114 // Dummy in-progress flag. |
| 113 bool in_progress_; | 115 bool in_progress_; |
| 114 }; | 116 }; |
| 115 | 117 |
| 116 #endif // CONTENT_BROWSER_DOWNLOAD_MOCK_DOWNLOAD_FILE_H_ | 118 #endif // CONTENT_BROWSER_DOWNLOAD_MOCK_DOWNLOAD_FILE_H_ |
| OLD | NEW |