Cast: Skip receiver log messages with time delta that can't be encoded.
[chromium-blink-merge.git] / content / browser / service_worker / service_worker_utils.h
blob4c9f96d834f7d7e31fef9e17b7842ee4f3c11233
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
3 // found in the LICENSE file.
5 #ifndef CONTENT_BROWSER_SERVICE_WORKER_SERVICE_WORKER_UTILS_H_
6 #define CONTENT_BROWSER_SERVICE_WORKER_SERVICE_WORKER_UTILS_H_
8 #include "webkit/common/resource_type.h"
10 namespace content {
12 class ServiceWorkerUtils {
13 public:
14 static bool IsMainResourceType(ResourceType::Type type) {
15 return ResourceType::IsFrame(type) ||
16 ResourceType::IsSharedWorker(type);
19 static bool IsServiceWorkerResourceType(ResourceType::Type type) {
20 // TODO(kinuko): Add IsServiceWorker() to resource_type.h.
21 return type == ResourceType::SERVICE_WORKER;
25 } // namespace content
27 #endif // CONTENT_BROWSER_SERVICE_WORKER_SERVICE_WORKER_UTILS_H_