tree: d8aed6d1be7b3cea9ab6bf337e21c02f9a960f82 [path history] [tgz]
  1. android/
  2. app/
  3. base/
  4. browser/
  5. build/
  6. common/
  7. crash/
  8. crypto/
  9. device/
  10. graphics/
  11. media/
  12. net/
  13. public/
  14. renderer/
  15. service/
  16. system/
  17. tools/
  18. tracing/
  19. utility/
  20. __init__.py
  21. BUILD.gn
  22. chromecast.gni
  23. DEPS
  24. OWNERS
  25. README.md
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