Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(48)

Side by Side Diff: content/browser/download/mock_download_file.h

Issue 2823273004: Add new UMA stats for parallelizable download (Closed)
Patch Set: Created 3 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 10 matching lines...) Expand all
21 #include "testing/gtest/include/gtest/gtest.h" 21 #include "testing/gtest/include/gtest/gtest.h"
22 22
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_METHOD2(Initialize, 31 MOCK_METHOD3(Initialize,
32 void(const InitializeCallback&, 32 void(const InitializeCallback&,
33 const DownloadItem::ReceivedSlices& received_slices)); 33 const DownloadItem::ReceivedSlices& received_slices,
34 bool is_parallelizable));
34 void AddByteStream(std::unique_ptr<ByteStreamReader> stream_reader, 35 void AddByteStream(std::unique_ptr<ByteStreamReader> stream_reader,
35 int64_t offset, 36 int64_t offset,
36 int64_t length) override; 37 int64_t length) override;
37 MOCK_METHOD3(DoAddByteStream, 38 MOCK_METHOD3(DoAddByteStream,
38 void(ByteStreamReader* stream_reader, 39 void(ByteStreamReader* stream_reader,
39 int64_t offset, 40 int64_t offset,
40 int64_t length)); 41 int64_t length));
41 MOCK_METHOD2(AppendDataToFile, DownloadInterruptReason( 42 MOCK_METHOD2(AppendDataToFile, DownloadInterruptReason(
42 const char* data, size_t data_len)); 43 const char* data, size_t data_len));
43 MOCK_METHOD1(Rename, DownloadInterruptReason( 44 MOCK_METHOD1(Rename, DownloadInterruptReason(
(...skipping 19 matching lines...) Expand all
63 MOCK_METHOD1(GetHash, bool(std::string* hash)); 64 MOCK_METHOD1(GetHash, bool(std::string* hash));
64 MOCK_METHOD0(SendUpdate, void()); 65 MOCK_METHOD0(SendUpdate, void());
65 MOCK_CONST_METHOD0(Id, int()); 66 MOCK_CONST_METHOD0(Id, int());
66 MOCK_METHOD0(GetDownloadManager, DownloadManager*()); 67 MOCK_METHOD0(GetDownloadManager, DownloadManager*());
67 MOCK_CONST_METHOD0(DebugString, std::string()); 68 MOCK_CONST_METHOD0(DebugString, std::string());
68 }; 69 };
69 70
70 } // namespace content 71 } // namespace content
71 72
72 #endif // CONTENT_BROWSER_DOWNLOAD_MOCK_DOWNLOAD_FILE_H_ 73 #endif // CONTENT_BROWSER_DOWNLOAD_MOCK_DOWNLOAD_FILE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698