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 #include "content/browser/service_worker/service_worker_info.h"
7 #include "content/common/service_worker/service_worker_types.h"
8 #include "ipc/ipc_message.h"
12 ServiceWorkerVersionInfo::ServiceWorkerVersionInfo()
13 : running_status(ServiceWorkerVersion::STOPPED
),
14 status(ServiceWorkerVersion::NEW
),
15 registration_id(kInvalidServiceWorkerRegistrationId
),
16 version_id(kInvalidServiceWorkerVersionId
),
19 devtools_agent_route_id(MSG_ROUTING_NONE
) {
22 ServiceWorkerVersionInfo::ServiceWorkerVersionInfo(
23 ServiceWorkerVersion::RunningStatus running_status
,
24 ServiceWorkerVersion::Status status
,
25 const GURL
& script_url
,
26 int64 registration_id
,
30 int devtools_agent_route_id
)
31 : running_status(running_status
),
33 script_url(script_url
),
34 registration_id(registration_id
),
35 version_id(version_id
),
36 process_id(process_id
),
38 devtools_agent_route_id(devtools_agent_route_id
) {
41 ServiceWorkerVersionInfo::~ServiceWorkerVersionInfo() {}
43 ServiceWorkerRegistrationInfo::ServiceWorkerRegistrationInfo()
44 : registration_id(kInvalidServiceWorkerRegistrationId
),
45 delete_flag(IS_NOT_DELETED
),
46 stored_version_size_bytes(0) {
49 ServiceWorkerRegistrationInfo::ServiceWorkerRegistrationInfo(
51 int64 registration_id
,
52 DeleteFlag delete_flag
)
54 registration_id(registration_id
),
55 delete_flag(delete_flag
),
56 stored_version_size_bytes(0) {
59 ServiceWorkerRegistrationInfo::ServiceWorkerRegistrationInfo(
61 int64 registration_id
,
62 DeleteFlag delete_flag
,
63 const ServiceWorkerVersionInfo
& active_version
,
64 const ServiceWorkerVersionInfo
& waiting_version
,
65 const ServiceWorkerVersionInfo
& installing_version
,
66 int64_t stored_version_size_bytes
)
68 registration_id(registration_id
),
69 delete_flag(delete_flag
),
70 active_version(active_version
),
71 waiting_version(waiting_version
),
72 installing_version(installing_version
),
73 stored_version_size_bytes(stored_version_size_bytes
) {
76 ServiceWorkerRegistrationInfo::~ServiceWorkerRegistrationInfo() {}
78 } // namespace content