| OLD | NEW |
| (Empty) | |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #ifndef CHROMECAST_BASE_METRICS_MOCK_CAST_METRICS_HELPER_H_ |
| 6 #define CHROMECAST_BASE_METRICS_MOCK_CAST_METRICS_HELPER_H_ |
| 7 |
| 8 #include "base/macros.h" |
| 9 #include "chromecast/base/metrics/cast_metrics_helper.h" |
| 10 #include "testing/gmock/include/gmock/gmock.h" |
| 11 |
| 12 namespace chromecast { |
| 13 namespace metrics { |
| 14 |
| 15 class MockCastMetricsHelper : public CastMetricsHelper { |
| 16 public: |
| 17 MockCastMetricsHelper(); |
| 18 ~MockCastMetricsHelper() override; |
| 19 |
| 20 MOCK_METHOD2(UpdateCurrentAppInfo, |
| 21 void(const std::string& app_id, const std::string& session_id)); |
| 22 MOCK_METHOD1(UpdateSDKInfo, void(const std::string& sdk_version)); |
| 23 MOCK_METHOD0(LogMediaPlay, void()); |
| 24 MOCK_METHOD0(LogMediaPause, void()); |
| 25 MOCK_METHOD1(RecordSimpleAction, void(const std::string& action)); |
| 26 MOCK_METHOD2(RecordEventWithValue, |
| 27 void(const std::string& action, int value)); |
| 28 MOCK_METHOD1(RecordApplicationEvent, void(const std::string& event)); |
| 29 MOCK_METHOD2(RecordApplicationEventWithValue, |
| 30 void(const std::string& event, int value)); |
| 31 MOCK_METHOD0(LogTimeToFirstPaint, void()); |
| 32 MOCK_METHOD0(LogTimeToFirstAudio, void()); |
| 33 MOCK_METHOD2(LogTimeToBufferAv, |
| 34 void(BufferingType buffering_type, base::TimeDelta time)); |
| 35 MOCK_CONST_METHOD2(GetMetricsNameWithAppName, |
| 36 std::string(const std::string& prefix, |
| 37 const std::string& suffix)); |
| 38 MOCK_METHOD1(SetMetricsSink, void(MetricsSink* delegate)); |
| 39 MOCK_METHOD1(SetRecordActionCallback, |
| 40 void(const RecordActionCallback& callback)); |
| 41 |
| 42 private: |
| 43 DISALLOW_COPY_AND_ASSIGN(MockCastMetricsHelper); |
| 44 }; |
| 45 |
| 46 } // namespace metrics |
| 47 } // namespace chromecast |
| 48 |
| 49 #endif // CHROMECAST_BASE_METRICS_MOCK_CAST_METRICS_HELPER_H_ |
| OLD | NEW |