| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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 MEDIA_BASE_MOCK_MEDIA_LOG_H_ | 5 #ifndef MEDIA_BASE_MOCK_MEDIA_LOG_H_ |
| 6 #define MEDIA_BASE_MOCK_MEDIA_LOG_H_ | 6 #define MEDIA_BASE_MOCK_MEDIA_LOG_H_ |
| 7 | 7 |
| 8 #include <memory> | 8 #include <memory> |
| 9 #include <string> | 9 #include <string> |
| 10 | 10 |
| (...skipping 14 matching lines...) Expand all Loading... |
| 25 class MockMediaLog : public MediaLog { | 25 class MockMediaLog : public MediaLog { |
| 26 public: | 26 public: |
| 27 MockMediaLog(); | 27 MockMediaLog(); |
| 28 | 28 |
| 29 MOCK_METHOD1(DoAddEventLogString, void(const std::string& event)); | 29 MOCK_METHOD1(DoAddEventLogString, void(const std::string& event)); |
| 30 | 30 |
| 31 // Trampoline method to workaround GMOCK problems with std::unique_ptr<>. | 31 // Trampoline method to workaround GMOCK problems with std::unique_ptr<>. |
| 32 // Also simplifies tests to be able to string match on the log string | 32 // Also simplifies tests to be able to string match on the log string |
| 33 // representation on the added event. | 33 // representation on the added event. |
| 34 void AddEvent(std::unique_ptr<MediaLogEvent> event) override { | 34 void AddEvent(std::unique_ptr<MediaLogEvent> event) override { |
| 35 DoAddEventLogString(MediaEventToLogString(*event)); | 35 DoAddEventLogString(MediaEventToLogString(*event, true)); |
| 36 } | 36 } |
| 37 | 37 |
| 38 protected: | 38 protected: |
| 39 virtual ~MockMediaLog(); | 39 virtual ~MockMediaLog(); |
| 40 | 40 |
| 41 private: | 41 private: |
| 42 DISALLOW_COPY_AND_ASSIGN(MockMediaLog); | 42 DISALLOW_COPY_AND_ASSIGN(MockMediaLog); |
| 43 }; | 43 }; |
| 44 | 44 |
| 45 } // namespace media | 45 } // namespace media |
| 46 | 46 |
| 47 #endif // MEDIA_BASE_MOCK_MEDIA_LOG_H_ | 47 #endif // MEDIA_BASE_MOCK_MEDIA_LOG_H_ |
| OLD | NEW |