| 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_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 | 7 |
| 8 #include <stddef.h> | 8 #include <stddef.h> |
| 9 #include <stdint.h> | 9 #include <stdint.h> |
| 10 | 10 |
| (...skipping 12 matching lines...) Expand all Loading... |
| 23 namespace content { | 23 namespace content { |
| 24 | 24 |
| 25 class MockDownloadFile : public DownloadFile { | 25 class MockDownloadFile : public DownloadFile { |
| 26 public: | 26 public: |
| 27 MockDownloadFile(); | 27 MockDownloadFile(); |
| 28 virtual ~MockDownloadFile(); | 28 virtual ~MockDownloadFile(); |
| 29 | 29 |
| 30 // DownloadFile functions. | 30 // DownloadFile functions. |
| 31 MOCK_METHOD1(Initialize, void(const InitializeCallback&)); | 31 MOCK_METHOD1(Initialize, void(const InitializeCallback&)); |
| 32 void AddByteStream(std::unique_ptr<ByteStreamReader> stream_reader, | 32 void AddByteStream(std::unique_ptr<ByteStreamReader> stream_reader, |
| 33 int64_t offset) override; | 33 int64_t offset, |
| 34 MOCK_METHOD2(DoAddByteStream, | 34 int64_t length) override; |
| 35 void(ByteStreamReader* stream_reader, int64_t offset)); | 35 MOCK_METHOD3(DoAddByteStream, |
| 36 void(ByteStreamReader* stream_reader, |
| 37 int64_t offset, |
| 38 int64_t length)); |
| 36 MOCK_METHOD2(AppendDataToFile, DownloadInterruptReason( | 39 MOCK_METHOD2(AppendDataToFile, DownloadInterruptReason( |
| 37 const char* data, size_t data_len)); | 40 const char* data, size_t data_len)); |
| 38 MOCK_METHOD1(Rename, DownloadInterruptReason( | 41 MOCK_METHOD1(Rename, DownloadInterruptReason( |
| 39 const base::FilePath& full_path)); | 42 const base::FilePath& full_path)); |
| 40 MOCK_METHOD2(RenameAndUniquify, | 43 MOCK_METHOD2(RenameAndUniquify, |
| 41 void(const base::FilePath& full_path, | 44 void(const base::FilePath& full_path, |
| 42 const RenameCompletionCallback& callback)); | 45 const RenameCompletionCallback& callback)); |
| 43 MOCK_METHOD5(RenameAndAnnotate, | 46 MOCK_METHOD5(RenameAndAnnotate, |
| 44 void(const base::FilePath& full_path, | 47 void(const base::FilePath& full_path, |
| 45 const std::string& client_guid, | 48 const std::string& client_guid, |
| (...skipping 10 matching lines...) Expand all Loading... |
| 56 MOCK_METHOD1(GetHash, bool(std::string* hash)); | 59 MOCK_METHOD1(GetHash, bool(std::string* hash)); |
| 57 MOCK_METHOD0(SendUpdate, void()); | 60 MOCK_METHOD0(SendUpdate, void()); |
| 58 MOCK_CONST_METHOD0(Id, int()); | 61 MOCK_CONST_METHOD0(Id, int()); |
| 59 MOCK_METHOD0(GetDownloadManager, DownloadManager*()); | 62 MOCK_METHOD0(GetDownloadManager, DownloadManager*()); |
| 60 MOCK_CONST_METHOD0(DebugString, std::string()); | 63 MOCK_CONST_METHOD0(DebugString, std::string()); |
| 61 }; | 64 }; |
| 62 | 65 |
| 63 } // namespace content | 66 } // namespace content |
| 64 | 67 |
| 65 #endif // CONTENT_BROWSER_DOWNLOAD_MOCK_DOWNLOAD_FILE_H_ | 68 #endif // CONTENT_BROWSER_DOWNLOAD_MOCK_DOWNLOAD_FILE_H_ |
| OLD | NEW |