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

Unified Diff: content/renderer/media/render_media_client.h

Issue 2668813002: Remove LazyInstance usage from media/ (Closed)
Patch Set: Fix presubmit comments. Created 3 years, 10 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 side-by-side diff with in-line comments
Download patch
Index: content/renderer/media/render_media_client.h
diff --git a/content/renderer/media/render_media_client.h b/content/renderer/media/render_media_client.h
index 8f793d9652e9080edabdf9d3f7859d3bb69f1a27..0f05ceac2f2edb1d0dd0f2316c27ce7db06559b4 100644
--- a/content/renderer/media/render_media_client.h
+++ b/content/renderer/media/render_media_client.h
@@ -7,8 +7,6 @@
#include <memory>
-#include "base/lazy_instance.h"
-#include "base/macros.h"
#include "base/threading/thread_checker.h"
#include "base/time/tick_clock.h"
#include "base/time/time.h"
@@ -39,11 +37,13 @@ class CONTENT_EXPORT RenderMediaClient : public media::MediaClient {
void SetTickClockForTesting(std::unique_ptr<base::TickClock> tick_clock);
private:
- friend struct base::DefaultLazyInstanceTraits<RenderMediaClient>;
+ friend class RenderMediaClientTest;
RenderMediaClient();
~RenderMediaClient() override;
+ static RenderMediaClient* GetInstance();
+
// Makes sure all methods are called from the same thread.
base::ThreadChecker thread_checker_;
@@ -61,12 +61,6 @@ class CONTENT_EXPORT RenderMediaClient : public media::MediaClient {
DISALLOW_COPY_AND_ASSIGN(RenderMediaClient);
};
-#if defined(UNIT_TEST)
-// Helper function to access the RenderMediaClient instance. Used only by unit
-// tests.
-CONTENT_EXPORT RenderMediaClient* GetRenderMediaClientInstanceForTesting();
-#endif
-
} // namespace content
#endif // CONTENT_RENDERER_MEDIA_RENDER_MEDIA_CLIENT_H_
« no previous file with comments | « content/renderer/media/recorder/video_track_recorder.cc ('k') | content/renderer/media/render_media_client.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698