tree: b35a6d0ffc9a48763a7c8d98e044da8528b73156 [path history] [tgz]
  2. DEPS
  6. android/
  7. app/
  8. base/
  9. browser/
  10. build/
  11. chromecast.gni
  12. common/
  13. crash/
  14. crypto/
  15. device/
  16. graphics/
  17. media/
  18. net/
  19. public/
  20. renderer/
  21. service/
  22. system/
  23. tools/
  24. tracing/
  25. utility/

Cast base


This file contains tools for checking the feature state of all of the features which affect Cast products. Cast features build upon the Chrome feature system. Some aspects of Cast require the feature system to work differently, however, so some additional logic has been layered on top. Details are available in comments of the header file. The basics are:

  • If you are adding a new feature, add it to so it lives alongside existing features
  • Add registration of your new feature via RegisterFeature(&feature). You can add it to RegisterFeatures() so it lives with existing features
const base::Feature kMyFeature{"my_feature", base::FEATURE_DISABLED_BY_DEFAULT};

void RegisterFeatures() {
 // ...other features
  • If you are writing a unit test that touches code that reads your feature be sure to call RegisterFeaturesForTesting() in your unit test constructor