| 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/command_line.h" | 8 #include "base/command_line.h" |
| 9 #include "base/macros.h" | 9 #include "base/macros.h" |
| 10 #include "content/common/content_export.h" | 10 #include "content/common/content_export.h" |
| 11 #include "content/common/service_worker/service_worker_status_code.h" | 11 #include "content/common/service_worker/service_worker_status_code.h" |
| 12 #include "content/common/service_worker/service_worker_types.h" | 12 #include "content/common/service_worker/service_worker_types.h" |
| 13 #include "content/public/common/content_switches.h" | 13 #include "content/public/common/content_switches.h" |
| 14 #include "content/public/common/resource_type.h" | 14 #include "content/public/common/resource_type.h" |
| 15 #include "content/public/common/service_worker_modes.h" |
| 15 #include "url/gurl.h" | 16 #include "url/gurl.h" |
| 16 | 17 |
| 17 namespace content { | 18 namespace content { |
| 18 | 19 |
| 19 class ServiceWorkerUtils { | 20 class ServiceWorkerUtils { |
| 20 public: | 21 public: |
| 21 static bool IsMainResourceType(ResourceType type) { | 22 static bool IsMainResourceType(ResourceType type) { |
| 22 return IsResourceTypeFrame(type) || type == RESOURCE_TYPE_SHARED_WORKER; | 23 return IsResourceTypeFrame(type) || type == RESOURCE_TYPE_SHARED_WORKER; |
| 23 } | 24 } |
| 24 | 25 |
| (...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 72 private: | 73 private: |
| 73 const GURL url_; | 74 const GURL url_; |
| 74 GURL match_; | 75 GURL match_; |
| 75 | 76 |
| 76 DISALLOW_COPY_AND_ASSIGN(LongestScopeMatcher); | 77 DISALLOW_COPY_AND_ASSIGN(LongestScopeMatcher); |
| 77 }; | 78 }; |
| 78 | 79 |
| 79 } // namespace content | 80 } // namespace content |
| 80 | 81 |
| 81 #endif // CONTENT_COMMON_SERVICE_WORKER_SERVICE_WORKER_UTILS_H_ | 82 #endif // CONTENT_COMMON_SERVICE_WORKER_SERVICE_WORKER_UTILS_H_ |
| OLD | NEW |