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_INFO_H_
6 #define CONTENT_BROWSER_SERVICE_WORKER_SERVICE_WORKER_INFO_H_
10 #include "base/time/time.h"
11 #include "content/browser/service_worker/service_worker_version.h"
12 #include "content/common/content_export.h"
17 struct CONTENT_EXPORT ServiceWorkerVersionInfo
{
19 ServiceWorkerVersionInfo();
20 ServiceWorkerVersionInfo(ServiceWorkerVersion::RunningStatus running_status
,
21 ServiceWorkerVersion::Status status
,
22 const GURL
& script_url
,
23 int64 registration_id
,
27 int devtools_agent_route_id
);
28 ~ServiceWorkerVersionInfo();
30 ServiceWorkerVersion::RunningStatus running_status
;
31 ServiceWorkerVersion::Status status
;
33 int64 registration_id
;
37 int devtools_agent_route_id
;
38 base::Time script_response_time
;
39 base::Time script_last_modified
;
42 struct CONTENT_EXPORT ServiceWorkerRegistrationInfo
{
44 enum DeleteFlag
{ IS_NOT_DELETED
, IS_DELETED
};
45 ServiceWorkerRegistrationInfo();
46 ServiceWorkerRegistrationInfo(const GURL
& pattern
,
47 int64 registration_id
,
48 DeleteFlag delete_flag
);
49 ServiceWorkerRegistrationInfo(
51 int64 registration_id
,
52 DeleteFlag delete_flag
,
53 const ServiceWorkerVersionInfo
& active_version
,
54 const ServiceWorkerVersionInfo
& waiting_version
,
55 const ServiceWorkerVersionInfo
& installing_version
,
56 int64_t active_version_total_size_bytes
);
57 ~ServiceWorkerRegistrationInfo();
60 int64 registration_id
;
61 DeleteFlag delete_flag
;
62 ServiceWorkerVersionInfo active_version
;
63 ServiceWorkerVersionInfo waiting_version
;
64 ServiceWorkerVersionInfo installing_version
;
66 int64_t stored_version_size_bytes
;
69 } // namespace content
71 #endif // CONTENT_BROWSER_SERVICE_WORKER_SERVICE_WORKER_INFO_H_