Index: content/browser/media/android/browser_media_player_manager.cc |
diff --git a/content/browser/media/android/browser_media_player_manager.cc b/content/browser/media/android/browser_media_player_manager.cc |
index 23ba8c33bf88c3d8ff3a779c4b5d55671f31f42c..25aebf2787680424328ddfed46817a2b2ec6c799 100644 |
--- a/content/browser/media/android/browser_media_player_manager.cc |
+++ b/content/browser/media/android/browser_media_player_manager.cc |
@@ -47,7 +47,12 @@ static media::MediaUrlInterceptor* media_url_interceptor_ = NULL; |
// static |
void BrowserMediaPlayerManager::RegisterFactory(Factory factory) { |
- g_factory = factory; |
+ // TODO(aberent) nullptr test is a temporary fix to simplify upstreaming Cast. |
+ // Until Cast is fully upstreamed we want the downstream factory to take |
+ // priority over the upstream factory. The downstream call happens first, |
+ // so this will ensure that it does. |
+ if (g_factory == nullptr) |
+ g_factory = factory; |
} |
// static |