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

Unified Diff: ios/chrome/browser/physical_web/physical_web_initial_state_recorder.h

Issue 2458613004: Record the initial state of the Physical Web at startup (Closed)
Patch Set: fix retain loop Created 3 years, 11 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
Index: ios/chrome/browser/physical_web/physical_web_initial_state_recorder.h
diff --git a/ios/chrome/browser/physical_web/physical_web_initial_state_recorder.h b/ios/chrome/browser/physical_web/physical_web_initial_state_recorder.h
new file mode 100644
index 0000000000000000000000000000000000000000..1d0aabfb294c45baa1b2adb2134154c85e08f7cc
--- /dev/null
+++ b/ios/chrome/browser/physical_web/physical_web_initial_state_recorder.h
@@ -0,0 +1,29 @@
+// Copyright 2016 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef IOS_CHROME_BROWSER_PHYSICAL_WEB_PHYSICAL_WEB_INITIAL_STATE_RECORDER_H_
+#define IOS_CHROME_BROWSER_PHYSICAL_WEB_PHYSICAL_WEB_INITIAL_STATE_RECORDER_H_
+
+#import <CoreBluetooth/CoreBluetooth.h>
+
+class PrefService;
+
+@interface PhysicalWebInitialStateRecorder : NSObject<CBCentralManagerDelegate>
+
+- (instancetype)initWithPrefService:(PrefService*)prefService
+ NS_DESIGNATED_INITIALIZER;
+
+- (instancetype)init NS_UNAVAILABLE;
+
+// Fetches and logs the current state of settings relevant to the Physical Web
+// feature.
+- (void)collectAndRecordState;
+
+// If the initial state has not yet been recorded, abort collection and
+// invalidate the timer.
+- (void)invalidate;
+
+@end
+
+#endif // IOS_CHROME_BROWSER_PHYSICAL_WEB_PHYSICAL_WEB_INITIAL_STATE_RECORDER_H_

Powered by Google App Engine
This is Rietveld 408576698