OLD | NEW |
(Empty) | |
| 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 |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #include "chrome/browser/media/router/media_router_feature.h" |
| 6 |
| 7 #include "build/build_config.h" |
| 8 |
| 9 #if defined(ENABLE_EXTENSIONS) |
| 10 #include "extensions/common/feature_switch.h" |
| 11 #endif |
| 12 |
| 13 namespace media_router { |
| 14 |
| 15 bool MediaRouterEnabled() { |
| 16 #if defined(ENABLE_MEDIA_ROUTER) |
| 17 #if defined(OS_ANDROID) |
| 18 return true; |
| 19 #elif defined(ENABLE_EXTENSIONS) |
| 20 return extensions::FeatureSwitch::media_router()->IsEnabled(); |
| 21 #else // !defined(ENABLE_EXTENSIONS) |
| 22 return false; |
| 23 #endif // defined(OS_ANDROID) |
| 24 #else // !defined(ENABLE_MEDIA_ROUTER) |
| 25 return false; |
| 26 #endif // defined(ENABLE_MEDIA_ROUTER) |
| 27 } |
| 28 |
| 29 } // namespace media_router |
OLD | NEW |