OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 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 | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef COMPONENTS_NACL_COMMON_PNACL_TYPES_H_ | 5 #ifndef COMPONENTS_NACL_COMMON_PNACL_TYPES_H_ |
6 #define COMPONENTS_NACL_COMMON_PNACL_TYPES_H_ | 6 #define COMPONENTS_NACL_COMMON_PNACL_TYPES_H_ |
7 | 7 |
8 // This file exists (instead of putting this type into nacl_types.h) because | 8 // This file exists (instead of putting this type into nacl_types.h) because |
9 // nacl_types is built into nacl_helper in addition to chrome, and we don't | 9 // nacl_types is built into nacl_helper in addition to chrome, and we don't |
10 // want to pull src/url/ into there, since it would be unnecessary bloat. | 10 // want to pull src/url/ into there, since it would be unnecessary bloat. |
11 | 11 |
12 #include "base/basictypes.h" | 12 #include "base/basictypes.h" |
13 #include "base/time/time.h" | 13 #include "base/time/time.h" |
14 #include "url/gurl.h" | 14 #include "url/gurl.h" |
15 | 15 |
16 namespace nacl { | 16 namespace nacl { |
17 // Cache-related information about pexe files, sent from the plugin/renderer | 17 // Cache-related information about pexe files, sent from the plugin/renderer |
18 // to the browser. | 18 // to the browser. |
19 // | 19 // |
20 // If you change this, you will also need to update the IPC serialization in | 20 // If you change this, you will also need to update the IPC serialization in |
21 // nacl_host_messages.h. | 21 // nacl_host_messages.h. |
22 struct PnaclCacheInfo { | 22 struct PnaclCacheInfo { |
23 PnaclCacheInfo(); | 23 PnaclCacheInfo(); |
24 ~PnaclCacheInfo(); | 24 ~PnaclCacheInfo(); |
25 GURL pexe_url; | 25 GURL pexe_url; |
26 int abi_version; | 26 int abi_version; |
27 int opt_level; | 27 int opt_level; |
28 base::Time last_modified; | 28 base::Time last_modified; |
29 std::string etag; | 29 std::string etag; |
| 30 bool has_no_store_header; |
30 }; | 31 }; |
31 | 32 |
32 // Progress information for PNaCl on-demand installs. | 33 // Progress information for PNaCl on-demand installs. |
33 struct PnaclInstallProgress { | 34 struct PnaclInstallProgress { |
34 int64 current; | 35 int64 current; |
35 int64 total_size; | 36 int64 total_size; |
36 | 37 |
37 // Returns an instance of PnaclInstallProgress where the | 38 // Returns an instance of PnaclInstallProgress where the |
38 // total is marked as unknown. | 39 // total is marked as unknown. |
39 static PnaclInstallProgress Unknown(); | 40 static PnaclInstallProgress Unknown(); |
40 | 41 |
41 // Returns true if the given instance of PnaclInstallProgress has | 42 // Returns true if the given instance of PnaclInstallProgress has |
42 // an unknown total. | 43 // an unknown total. |
43 static bool progress_known(const PnaclInstallProgress& p); | 44 static bool progress_known(const PnaclInstallProgress& p); |
44 }; | 45 }; |
45 | 46 |
46 } // namespace nacl | 47 } // namespace nacl |
47 | 48 |
48 #endif // COMPONENTS_NACL_COMMON_PNACL_TYPES_H_ | 49 #endif // COMPONENTS_NACL_COMMON_PNACL_TYPES_H_ |
OLD | NEW |