Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(279)

Unified Diff: services/media/factory_service/watched.h

Issue 1822333002: Motown: wholesale clang-format (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: dalesat Created 4 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « services/media/factory_service/rule_set.cc ('k') | services/media/framework/conversion_pipeline_builder.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: services/media/factory_service/watched.h
diff --git a/services/media/factory_service/watched.h b/services/media/factory_service/watched.h
index 74d2578fc92a219e7631298bb58604cef087f1dd..c53367d9d4623e1f96518c372fe6dd9586a78e72 100644
--- a/services/media/factory_service/watched.h
+++ b/services/media/factory_service/watched.h
@@ -11,7 +11,8 @@ namespace mojo {
namespace media {
// Wraps an object, providing Events that occur when certain criteria are met.
-template<typename T> class Watched : public RuleSet {
+template <typename T>
+class Watched : public RuleSet {
public:
Watched() {}
explicit Watched(T t) : t_(t) {}
@@ -19,18 +20,14 @@ template<typename T> class Watched : public RuleSet {
// Returns a Event that will occur when the value of this Watched changes
// to comparand (immediately if they're already equal).
Event Becomes(const T& comparand) {
- return AddRule([this, comparand]() -> bool {
- return t_ == comparand;
- });
+ return AddRule([this, comparand]() -> bool { return t_ == comparand; });
}
// Returns a Event that will occur when the value of this Watched changes
// to something other than comparand (immediately if they're already not
// equal).
Event BecomesOtherThan(const T& comparand) {
- return AddRule([this, comparand]() -> bool {
- return t_ != comparand;
- });
+ return AddRule([this, comparand]() -> bool { return t_ != comparand; });
}
void SetWithConsequences(const T& t) {
@@ -38,13 +35,9 @@ template<typename T> class Watched : public RuleSet {
CheckRules();
}
- operator T() {
- return t_;
- }
+ operator T() { return t_; }
- operator const T&() const {
- return t_;
- }
+ operator const T&() const { return t_; }
private:
T t_;
« no previous file with comments | « services/media/factory_service/rule_set.cc ('k') | services/media/framework/conversion_pipeline_builder.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698