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

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

Issue 2413923002: Enable lost URL detection in the Physical Web scanner (Closed)
Patch Set: 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
Index: ios/chrome/common/physical_web/physical_web_request.mm
diff --git a/ios/chrome/common/physical_web/physical_web_request.mm b/ios/chrome/common/physical_web/physical_web_request.mm
index 15e2a207149a5a891d0c8284b5e3279271cc5e72..c685626db7df11b4819d838ef2b264f89639d522 100644
--- a/ios/chrome/common/physical_web/physical_web_request.mm
+++ b/ios/chrome/common/physical_web/physical_web_request.mm
@@ -96,7 +96,7 @@ std::string GetUserAgent() {
// body of the POST request.
NSDictionary* jsonBody =
- @{ kUrlsKey : @[ @{kUrlKey : [[device_ url] absoluteString]} ] };
+ @{ kUrlsKey : @[ @{kUrlKey : [[device_ requestURL] absoluteString]} ] };
[request_ setHTTPBody:[NSJSONSerialization dataWithJSONObject:jsonBody
options:0
error:NULL]];
@@ -232,14 +232,12 @@ std::string GetUserAgent() {
NSString* description =
base::mac::ObjCCast<NSString>(pageInfo[kDescriptionKey]);
NSString* title = base::mac::ObjCCast<NSString>(pageInfo[kTitleKey]);
- NSURL* scannedUrl =
- scannedUrlString ? [NSURL URLWithString:scannedUrlString] : nil;
NSURL* resolvedUrl =
resolvedUrlString ? [NSURL URLWithString:resolvedUrlString] : nil;
NSURL* icon = iconString ? [NSURL URLWithString:iconString] : nil;
base::scoped_nsobject<PhysicalWebDevice> device([[PhysicalWebDevice alloc]
initWithURL:resolvedUrl
- requestURL:scannedUrl
+ requestURL:[device_ requestURL]
icon:icon
title:title
description:description

Powered by Google App Engine
This is Rietveld 408576698