Add ICU message format support
[chromium-blink-merge.git] / content / browser / service_worker / service_worker_info.h
blobf177e75451a68c857601b768f6b9b212563da4c9
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_
8 #include <vector>
10 #include "base/time/time.h"
11 #include "content/browser/service_worker/service_worker_version.h"
12 #include "content/common/content_export.h"
13 #include "url/gurl.h"
15 namespace content {
17 struct CONTENT_EXPORT ServiceWorkerVersionInfo {
18 public:
19 struct CONTENT_EXPORT ClientInfo {
20 public:
21 ClientInfo();
22 ClientInfo(int process_id, int route_id, ServiceWorkerProviderType type);
23 ~ClientInfo();
24 int process_id;
25 int route_id;
26 ServiceWorkerProviderType type;
29 ServiceWorkerVersionInfo();
30 ServiceWorkerVersionInfo(ServiceWorkerVersion::RunningStatus running_status,
31 ServiceWorkerVersion::Status status,
32 const GURL& script_url,
33 int64 registration_id,
34 int64 version_id,
35 int process_id,
36 int thread_id,
37 int devtools_agent_route_id);
38 ~ServiceWorkerVersionInfo();
40 ServiceWorkerVersion::RunningStatus running_status;
41 ServiceWorkerVersion::Status status;
42 GURL script_url;
43 int64 registration_id;
44 int64 version_id;
45 int process_id;
46 int thread_id;
47 int devtools_agent_route_id;
48 base::Time script_response_time;
49 base::Time script_last_modified;
50 std::map<std::string, ClientInfo> clients;
53 struct CONTENT_EXPORT ServiceWorkerRegistrationInfo {
54 public:
55 enum DeleteFlag { IS_NOT_DELETED, IS_DELETED };
56 ServiceWorkerRegistrationInfo();
57 ServiceWorkerRegistrationInfo(const GURL& pattern,
58 int64 registration_id,
59 DeleteFlag delete_flag);
60 ServiceWorkerRegistrationInfo(
61 const GURL& pattern,
62 int64 registration_id,
63 DeleteFlag delete_flag,
64 const ServiceWorkerVersionInfo& active_version,
65 const ServiceWorkerVersionInfo& waiting_version,
66 const ServiceWorkerVersionInfo& installing_version,
67 int64_t active_version_total_size_bytes);
68 ~ServiceWorkerRegistrationInfo();
70 GURL pattern;
71 int64 registration_id;
72 DeleteFlag delete_flag;
73 ServiceWorkerVersionInfo active_version;
74 ServiceWorkerVersionInfo waiting_version;
75 ServiceWorkerVersionInfo installing_version;
77 int64_t stored_version_size_bytes;
80 } // namespace content
82 #endif // CONTENT_BROWSER_SERVICE_WORKER_SERVICE_WORKER_INFO_H_