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

Unified Diff: ios/chrome/common/physical_web/physical_web_scanner.mm

Issue 2403423005: Expose Physical Web metadata to native clients over JNI (Closed)
Patch Set: remove unit test Created 4 years, 2 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 | « components/physical_web/data_source/physical_web_data_source.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ios/chrome/common/physical_web/physical_web_scanner.mm
diff --git a/ios/chrome/common/physical_web/physical_web_scanner.mm b/ios/chrome/common/physical_web/physical_web_scanner.mm
index 4fa754803e9bdbb6bf2fcf445e4dc4bcb3980e41..ec84eef293b42427b1a1b831d1bdbe10220ab01a 100644
--- a/ios/chrome/common/physical_web/physical_web_scanner.mm
+++ b/ios/chrome/common/physical_web/physical_web_scanner.mm
@@ -15,6 +15,7 @@
#include "base/memory/ptr_util.h"
#include "base/strings/sys_string_conversions.h"
#include "base/values.h"
+#include "components/physical_web/data_source/physical_web_data_source.h"
#include "device/bluetooth/uribeacon/uri_encoder.h"
#import "ios/chrome/common/physical_web/physical_web_device.h"
#import "ios/chrome/common/physical_web/physical_web_request.h"
@@ -186,11 +187,11 @@ enum BeaconType {
std::string description = base::SysNSStringToUTF8([device description]);
auto metadataItem = base::MakeUnique<base::DictionaryValue>();
- metadataItem->SetString("scannedUrl", scannedUrl);
- metadataItem->SetString("resolvedUrl", resolvedUrl);
- metadataItem->SetString("icon", icon);
- metadataItem->SetString("title", title);
- metadataItem->SetString("description", description);
+ metadataItem->SetString(kPhysicalWebScannedUrlKey, scannedUrl);
+ metadataItem->SetString(kPhysicalWebResolvedUrlKey, resolvedUrl);
+ metadataItem->SetString(kPhysicalWebIconUrlKey, icon);
+ metadataItem->SetString(kPhysicalWebTitleKey, title);
+ metadataItem->SetString(kPhysicalWebDescriptionKey, description);
metadataList->Append(std::move(metadataItem));
}
« no previous file with comments | « components/physical_web/data_source/physical_web_data_source.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698