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

Unified Diff: ios/chrome/browser/physical_web/ios_chrome_physical_web_data_source.mm

Issue 2458613004: Record the initial state of the Physical Web at startup (Closed)
Patch Set: move reporting to IOSChromePhysicalWebDataSource Created 4 years, 1 month 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/ios_chrome_physical_web_data_source.mm
diff --git a/ios/chrome/common/physical_web/ios_chrome_physical_web_data_source.mm b/ios/chrome/browser/physical_web/ios_chrome_physical_web_data_source.mm
similarity index 79%
rename from ios/chrome/common/physical_web/ios_chrome_physical_web_data_source.mm
rename to ios/chrome/browser/physical_web/ios_chrome_physical_web_data_source.mm
index 12edafa0a6d3178384cd40a280c991762cbeffec..b662920846c0b8b5c3cc7b592ddbe3866c71fd16 100644
--- a/ios/chrome/common/physical_web/ios_chrome_physical_web_data_source.mm
+++ b/ios/chrome/browser/physical_web/ios_chrome_physical_web_data_source.mm
@@ -2,10 +2,11 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#import "ios/chrome/common/physical_web/ios_chrome_physical_web_data_source.h"
+#import "ios/chrome/browser/physical_web/ios_chrome_physical_web_data_source.h"
#include "base/memory/ptr_util.h"
#include "base/values.h"
+#import "ios/chrome/browser/physical_web/physical_web_initial_state_recorder.h"
#import "ios/chrome/common/physical_web/physical_web_scanner.h"
IOSChromePhysicalWebDataSource::IOSChromePhysicalWebDataSource() {}
@@ -48,3 +49,10 @@ std::unique_ptr<base::ListValue> IOSChromePhysicalWebDataSource::GetMetadata() {
bool IOSChromePhysicalWebDataSource::HasUnresolvedDiscoveries() {
return [scanner_ unresolvedBeaconsCount] > 0;
}
+
+void IOSChromePhysicalWebDataSource::RecordInitialState(
+ PrefService* pref_service) {
+ initialStateRecorder_.reset([[PhysicalWebInitialStateRecorder alloc]
+ initWithPrefService:pref_service]);
+ [initialStateRecorder_ collectAndRecordState];
+}

Powered by Google App Engine
This is Rietveld 408576698