tree: b35a6d0ffc9a48763a7c8d98e044da8528b73156 [path history] [tgz]
  1. BUILD.gn
  2. DEPS
  3. OWNERS
  4. README.md
  5. __init__.py
  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/
chromecast/README.md

Cast base

cast_features

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 cast_features.cc 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
 RegisterFeature(&kMyFeature);
}
  • If you are writing a unit test that touches code that reads your feature be sure to call RegisterFeaturesForTesting() in your unit test constructor