| Index: content/browser/service_worker/service_worker_utils.h
|
| diff --git a/content/browser/service_worker/service_worker_utils.h b/content/browser/service_worker/service_worker_utils.h
|
| index 38669c4317648145870670961284df7a64f50aed..25700dee2bd744864a56a6ae1e3e57166d39b96b 100644
|
| --- a/content/browser/service_worker/service_worker_utils.h
|
| +++ b/content/browser/service_worker/service_worker_utils.h
|
| @@ -9,6 +9,8 @@
|
| #include "content/common/service_worker/service_worker_status_code.h"
|
| #include "webkit/common/resource_type.h"
|
|
|
| +class GURL;
|
| +
|
| namespace content {
|
|
|
| class ServiceWorkerUtils {
|
| @@ -33,6 +35,21 @@ class ServiceWorkerUtils {
|
| CONTENT_EXPORT static bool ScopeMatches(const GURL& scope, const GURL& url);
|
| };
|
|
|
| +class CONTENT_EXPORT LongestScopeMatcher {
|
| + public:
|
| + explicit LongestScopeMatcher(const GURL& url) : url_(url) {}
|
| + virtual ~LongestScopeMatcher() {}
|
| +
|
| + // Returns true if |scope| matches |url_| longer than |match_|.
|
| + bool MatchLongest(const GURL& scope);
|
| +
|
| + private:
|
| + const GURL url_;
|
| + GURL match_;
|
| +
|
| + DISALLOW_COPY_AND_ASSIGN(LongestScopeMatcher);
|
| +};
|
| +
|
| } // namespace content
|
|
|
| #endif // CONTENT_BROWSER_SERVICE_WORKER_SERVICE_WORKER_UTILS_H_
|
|
|