Cast: Skip receiver log messages with time delta that can't be encoded.
[chromium-blink-merge.git] / content / browser / service_worker / service_worker_provider_host.cc
blob91361a006b62765f6a4f5b15631fd9bda6056a4c
1 // Copyright 2013 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 #include "content/browser/service_worker/service_worker_provider_host.h"
7 #include "content/browser/service_worker/service_worker_utils.h"
8 #include "content/browser/service_worker/service_worker_version.h"
10 namespace content {
12 ServiceWorkerProviderHost::ServiceWorkerProviderHost(
13 int process_id, int provider_id)
14 : process_id_(process_id), provider_id_(provider_id) {
17 ServiceWorkerProviderHost::~ServiceWorkerProviderHost() {
20 bool ServiceWorkerProviderHost::ShouldHandleRequest(
21 ResourceType::Type resource_type) const {
22 if (ServiceWorkerUtils::IsMainResourceType(resource_type))
23 return true;
25 if (associated_version())
26 return true;
28 return false;
31 } // namespace content