| OLD | NEW |
| 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 Loading... |
| 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 |
| OLD | NEW |