Upstream version 9.38.198.0
[platform/framework/web/crosswalk.git] / src / content / common / service_worker / service_worker_types.cc
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.
4
5 #include "content/common/service_worker/service_worker_types.h"
6
7 namespace content {
8
9 ServiceWorkerFetchRequest::ServiceWorkerFetchRequest() : is_reload(false) {
10 }
11
12 ServiceWorkerFetchRequest::ServiceWorkerFetchRequest(
13     const GURL& url,
14     const std::string& method,
15     const std::map<std::string, std::string>& headers,
16     const GURL& referrer,
17     bool is_reload)
18     : url(url),
19       method(method),
20       headers(headers),
21       referrer(referrer),
22       is_reload(is_reload) {
23 }
24
25 ServiceWorkerFetchRequest::~ServiceWorkerFetchRequest() {}
26
27 ServiceWorkerResponse::ServiceWorkerResponse() : status_code(0) {}
28
29 ServiceWorkerResponse::ServiceWorkerResponse(
30     const GURL& url,
31     int status_code,
32     const std::string& status_text,
33     const std::map<std::string, std::string>& headers,
34     const std::string& blob_uuid)
35     : url(url),
36       status_code(status_code),
37       status_text(status_text),
38       headers(headers),
39       blob_uuid(blob_uuid) {
40 }
41
42 ServiceWorkerResponse::~ServiceWorkerResponse() {}
43
44 ServiceWorkerObjectInfo::ServiceWorkerObjectInfo()
45     : handle_id(kInvalidServiceWorkerHandleId),
46       state(blink::WebServiceWorkerStateUnknown) {}
47
48 }  // namespace content