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

Side by Side Diff: ios/chrome/browser/ui/settings/utils/fake_observable_boolean.mm

Issue 2587023002: Upstream Chrome on iOS source code [8/11]. (Closed)
Patch Set: Created 3 years, 12 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 unified diff | Download patch
OLDNEW
(Empty)
1 // Copyright 2016 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 #import "ios/chrome/browser/ui/settings/utils/fake_observable_boolean.h"
6
7 @implementation FakeObservableBoolean
8
9 @synthesize value = _value;
10 @synthesize observer = _observer;
11
12 - (void)setValue:(BOOL)value {
13 bool changed = value != _value;
14 _value = value;
15 if (changed)
16 [self.observer booleanDidChange:self];
17 }
18
19 @end
20
21 @implementation TestBooleanObserver
22
23 @synthesize updateCount = _updateCount;
24
25 - (void)booleanDidChange:(id<ObservableBoolean>)observableBoolean {
26 self.updateCount++;
27 }
28
29 @end
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698