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 CHROME_BROWSER_EXTENSIONS_INSTALL_SIGNER_H_ | 5 #ifndef CHROME_BROWSER_EXTENSIONS_INSTALL_SIGNER_H_ |
6 #define CHROME_BROWSER_EXTENSIONS_INSTALL_SIGNER_H_ | 6 #define CHROME_BROWSER_EXTENSIONS_INSTALL_SIGNER_H_ |
7 | 7 |
8 #include <set> | 8 #include <set> |
9 #include <string> | 9 #include <string> |
10 #include <vector> | 10 #include <vector> |
(...skipping 20 matching lines...) Expand all Loading... | |
31 // The set of ids that have been signed. | 31 // The set of ids that have been signed. |
32 ExtensionIdSet ids; | 32 ExtensionIdSet ids; |
33 | 33 |
34 // Both of these are just arrays of bytes, NOT base64-encoded. | 34 // Both of these are just arrays of bytes, NOT base64-encoded. |
35 std::string salt; | 35 std::string salt; |
36 std::string signature; | 36 std::string signature; |
37 | 37 |
38 // The date that the signature should expire, in YYYY-MM-DD format. | 38 // The date that the signature should expire, in YYYY-MM-DD format. |
39 std::string expire_date; | 39 std::string expire_date; |
40 | 40 |
41 // The time this signature was obtained from the server. | |
42 base::Time timestamp; | |
43 | |
41 InstallSignature(); | 44 InstallSignature(); |
42 ~InstallSignature(); | 45 ~InstallSignature(); |
43 | 46 |
44 // Helper methods for serialization to/from a base::DictionaryValue. | 47 // Helper methods for serialization to/from a base::DictionaryValue. |
45 void ToValue(base::DictionaryValue* value) const; | 48 void ToValue(base::DictionaryValue* value) const; |
46 | 49 |
47 static scoped_ptr<InstallSignature> FromValue( | 50 static scoped_ptr<InstallSignature> FromValue( |
48 const base::DictionaryValue& value); | 51 const base::DictionaryValue& value); |
49 }; | 52 }; |
50 | 53 |
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
101 ExtensionIdSet ids_; | 104 ExtensionIdSet ids_; |
102 | 105 |
103 // An array of random bytes used as an input to hash with the machine id, | 106 // An array of random bytes used as an input to hash with the machine id, |
104 // which will need to be persisted in the eventual InstallSignature we get. | 107 // which will need to be persisted in the eventual InstallSignature we get. |
105 std::string salt_; | 108 std::string salt_; |
106 | 109 |
107 // These are used to make the call to a backend server for a signature. | 110 // These are used to make the call to a backend server for a signature. |
108 net::URLRequestContextGetter* context_getter_; | 111 net::URLRequestContextGetter* context_getter_; |
109 scoped_ptr<net::URLFetcher> url_fetcher_; | 112 scoped_ptr<net::URLFetcher> url_fetcher_; |
110 scoped_ptr<FetcherDelegate> delegate_; | 113 scoped_ptr<FetcherDelegate> delegate_; |
114 base::Time request_start_time_; // Not set until the request starts. | |
Finnur
2014/02/12 16:56:26
nit: Probably would prefer to have this not lumped
asargent_no_longer_on_chrome
2014/02/12 18:32:26
Done.
| |
111 | 115 |
112 DISALLOW_COPY_AND_ASSIGN(InstallSigner); | 116 DISALLOW_COPY_AND_ASSIGN(InstallSigner); |
113 }; | 117 }; |
114 | 118 |
115 } // namespace extensions | 119 } // namespace extensions |
116 | 120 |
117 #endif // CHROME_BROWSER_EXTENSIONS_INSTALL_SIGNER_H_ | 121 #endif // CHROME_BROWSER_EXTENSIONS_INSTALL_SIGNER_H_ |
OLD | NEW |