| Index: content/common/service_worker/service_worker_utils.cc
|
| diff --git a/content/common/service_worker/service_worker_utils.cc b/content/common/service_worker/service_worker_utils.cc
|
| index 9abc85887f4f96efa7262190628d00748468f5a1..ccf39273a06169343032a82ee707c4706b0592c4 100644
|
| --- a/content/common/service_worker/service_worker_utils.cc
|
| +++ b/content/common/service_worker/service_worker_utils.cc
|
| @@ -16,7 +16,7 @@ namespace content {
|
| namespace {
|
|
|
| bool PathContainsDisallowedCharacter(const GURL& url) {
|
| - std::string path = url.path();
|
| + base::StringPiece path = url.path();
|
| DCHECK(base::IsStringUTF8(path));
|
|
|
| // We should avoid these escaped characters in the path component because
|
| @@ -65,16 +65,16 @@ bool ServiceWorkerUtils::IsPathRestrictionSatisfied(
|
| error_message->append("') was received when fetching the script.");
|
| return false;
|
| }
|
| - max_scope_string = max_scope.path();
|
| + max_scope_string = max_scope.path().as_string();
|
| } else {
|
| - max_scope_string = script_url.Resolve(".").path();
|
| + max_scope_string = script_url.Resolve(".").path().as_string();
|
| }
|
|
|
| - std::string scope_string = scope.path();
|
| + base::StringPiece scope_string = scope.path();
|
| if (!base::StartsWith(scope_string, max_scope_string,
|
| base::CompareCase::SENSITIVE)) {
|
| *error_message = "The path of the provided scope ('";
|
| - error_message->append(scope_string);
|
| + error_message->append(scope_string.as_string());
|
| error_message->append("') is not under the max scope allowed (");
|
| if (service_worker_allowed_header_value)
|
| error_message->append("set by Service-Worker-Allowed: ");
|
|
|