Commit c1ef1a30 authored by Rohit Rao's avatar Rohit Rao Committed by Commit Bot

[ios] Fix scoping of variables in policy code.

BUG=1096117

Change-Id: I8f02f2c9a5f3da8c3e4560d33a2f04287abd901c
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2248730Reviewed-by: default avatarMike Dougherty <michaeldo@chromium.org>
Reviewed-by: default avatarJulian Pastarmov <pastarmovj@chromium.org>
Commit-Queue: Rohit Rao <rohitrao@chromium.org>
Cr-Commit-Position: refs/heads/master@{#779788}
parent 7818c659
......@@ -104,7 +104,7 @@ bool BypassBlacklistWildcardForURL(const GURL& url) {
// Leading and trailing slashes must be removed because the host name is
// parsed as the URL path (which may contain slashes).
base::StringPiece trimmed_path =
base::TrimString(url.path(), "/", base::TrimPositions::TRIM_ALL);
base::TrimString(url.path_piece(), "/", base::TrimPositions::TRIM_ALL);
if (scheme == kIosNtpAboutScheme && trimmed_path == kIosNtpHost) {
return true;
}
......
......@@ -49,8 +49,8 @@ std::unique_ptr<base::Value> DeserializeValue(NSString* json_value) {
return std::make_unique<base::Value>(base::Value::Type::NONE);
}
JSONStringValueDeserializer deserializer(
base::SysNSStringToUTF8((json_value)));
std::string json = base::SysNSStringToUTF8(json_value);
JSONStringValueDeserializer deserializer(json);
return deserializer.Deserialize(/*error_code=*/nullptr,
/*error_message=*/nullptr);
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment