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 #ifndef CONTENT_COMMON_SERVICE_WORKER_SERVICE_WORKER_UTILS_H_ | 5 #ifndef CONTENT_COMMON_SERVICE_WORKER_SERVICE_WORKER_UTILS_H_ |
6 #define CONTENT_COMMON_SERVICE_WORKER_SERVICE_WORKER_UTILS_H_ | 6 #define CONTENT_COMMON_SERVICE_WORKER_SERVICE_WORKER_UTILS_H_ |
7 | 7 |
8 #include "base/macros.h" | 8 #include "base/macros.h" |
9 #include "content/common/content_export.h" | 9 #include "content/common/content_export.h" |
10 #include "content/common/service_worker/service_worker_status_code.h" | 10 #include "content/common/service_worker/service_worker_status_code.h" |
| 11 #include "content/common/service_worker/service_worker_types.h" |
11 #include "content/public/common/resource_type.h" | 12 #include "content/public/common/resource_type.h" |
12 #include "url/gurl.h" | 13 #include "url/gurl.h" |
13 | 14 |
14 namespace content { | 15 namespace content { |
15 | 16 |
16 class ServiceWorkerUtils { | 17 class ServiceWorkerUtils { |
17 public: | 18 public: |
18 static bool IsMainResourceType(ResourceType type) { | 19 static bool IsMainResourceType(ResourceType type) { |
19 return IsResourceTypeFrame(type) || type == RESOURCE_TYPE_SHARED_WORKER; | 20 return IsResourceTypeFrame(type) || type == RESOURCE_TYPE_SHARED_WORKER; |
20 } | 21 } |
(...skipping 30 matching lines...) Expand all Loading... |
51 private: | 52 private: |
52 const GURL url_; | 53 const GURL url_; |
53 GURL match_; | 54 GURL match_; |
54 | 55 |
55 DISALLOW_COPY_AND_ASSIGN(LongestScopeMatcher); | 56 DISALLOW_COPY_AND_ASSIGN(LongestScopeMatcher); |
56 }; | 57 }; |
57 | 58 |
58 } // namespace content | 59 } // namespace content |
59 | 60 |
60 #endif // CONTENT_COMMON_SERVICE_WORKER_SERVICE_WORKER_UTILS_H_ | 61 #endif // CONTENT_COMMON_SERVICE_WORKER_SERVICE_WORKER_UTILS_H_ |
OLD | NEW |