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

Side by Side Diff: content/common/service_worker/service_worker_utils.cc

Issue 1259213002: Move Service Worker %2f path validation logic from browser into Blink (1) (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix remaining nits. Created 5 years, 4 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 unified diff | Download patch
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "content/browser/service_worker/service_worker_utils.h" 5 #include "content/common/service_worker/service_worker_utils.h"
6 6
7 #include <string> 7 #include <string>
8 8
9 #include "base/logging.h" 9 #include "base/logging.h"
10 #include "base/strings/string_util.h" 10 #include "base/strings/string_util.h"
11 11
12 namespace content { 12 namespace content {
13 13
14 namespace { 14 namespace {
15 15
(...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after
108 if (!ServiceWorkerUtils::ScopeMatches(scope, url_)) 108 if (!ServiceWorkerUtils::ScopeMatches(scope, url_))
109 return false; 109 return false;
110 if (match_.is_empty() || match_.spec().size() < scope.spec().size()) { 110 if (match_.is_empty() || match_.spec().size() < scope.spec().size()) {
111 match_ = scope; 111 match_ = scope;
112 return true; 112 return true;
113 } 113 }
114 return false; 114 return false;
115 } 115 }
116 116
117 } // namespace content 117 } // namespace content
OLDNEW
« no previous file with comments | « content/common/service_worker/service_worker_utils.h ('k') | content/common/service_worker/service_worker_utils_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698