Chromium Code Reviews| 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_RENDERER_MEDIA_RENDER_MEDIA_LOG_H_ | 5 #ifndef CONTENT_RENDERER_MEDIA_RENDER_MEDIA_LOG_H_ |
| 6 #define CONTENT_RENDERER_MEDIA_RENDER_MEDIA_LOG_H_ | 6 #define CONTENT_RENDERER_MEDIA_RENDER_MEDIA_LOG_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| (...skipping 21 matching lines...) Expand all Loading... | |
| 32 // | 32 // |
| 33 // It must be constructed on the render thread. | 33 // It must be constructed on the render thread. |
| 34 class CONTENT_EXPORT RenderMediaLog : public media::MediaLog { | 34 class CONTENT_EXPORT RenderMediaLog : public media::MediaLog { |
| 35 public: | 35 public: |
| 36 explicit RenderMediaLog(const GURL& security_origin); | 36 explicit RenderMediaLog(const GURL& security_origin); |
| 37 | 37 |
| 38 // MediaLog implementation. | 38 // MediaLog implementation. |
| 39 void AddEvent(std::unique_ptr<media::MediaLogEvent> event) override; | 39 void AddEvent(std::unique_ptr<media::MediaLogEvent> event) override; |
| 40 std::string GetLastErrorMessage() override; | 40 std::string GetLastErrorMessage() override; |
| 41 void RecordRapporWithSecurityOrigin(const std::string& metric) override; | 41 void RecordRapporWithSecurityOrigin(const std::string& metric) override; |
| 42 void RecordRapporWithURL(const std::string& metric, const GURL& url) override; | |
|
xhwang
2017/04/03 17:47:14
Please add a TODO to replace all usage of this one
chcunningham
2017/04/03 18:47:39
Implemented the TODO
| |
| 42 | 43 |
| 43 // Will reset |last_ipc_send_time_| with the value of NowTicks(). | 44 // Will reset |last_ipc_send_time_| with the value of NowTicks(). |
| 44 void SetTickClockForTesting(std::unique_ptr<base::TickClock> tick_clock); | 45 void SetTickClockForTesting(std::unique_ptr<base::TickClock> tick_clock); |
| 45 void SetTaskRunnerForTesting( | 46 void SetTaskRunnerForTesting( |
| 46 const scoped_refptr<base::SingleThreadTaskRunner>& task_runner); | 47 const scoped_refptr<base::SingleThreadTaskRunner>& task_runner); |
| 47 | 48 |
| 48 private: | 49 private: |
| 49 ~RenderMediaLog() override; | 50 ~RenderMediaLog() override; |
| 50 | 51 |
| 51 // Posted as a delayed task on |task_runner_| to throttle ipc message | 52 // Posted as a delayed task on |task_runner_| to throttle ipc message |
| (...skipping 26 matching lines...) Expand all Loading... | |
| 78 | 79 |
| 79 // Holds a copy of the most recent PIPELINE_ERROR, if any. | 80 // Holds a copy of the most recent PIPELINE_ERROR, if any. |
| 80 std::unique_ptr<media::MediaLogEvent> last_pipeline_error_; | 81 std::unique_ptr<media::MediaLogEvent> last_pipeline_error_; |
| 81 | 82 |
| 82 DISALLOW_COPY_AND_ASSIGN(RenderMediaLog); | 83 DISALLOW_COPY_AND_ASSIGN(RenderMediaLog); |
| 83 }; | 84 }; |
| 84 | 85 |
| 85 } // namespace content | 86 } // namespace content |
| 86 | 87 |
| 87 #endif // CONTENT_RENDERER_MEDIA_RENDER_MEDIA_LOG_H_ | 88 #endif // CONTENT_RENDERER_MEDIA_RENDER_MEDIA_LOG_H_ |
| OLD | NEW |