OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 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 | 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 EXTENSIONS_COMMON_UPDATE_MANIFEST_H_ | 5 #ifndef EXTENSIONS_COMMON_UPDATE_MANIFEST_H_ |
6 #define EXTENSIONS_COMMON_UPDATE_MANIFEST_H_ | 6 #define EXTENSIONS_COMMON_UPDATE_MANIFEST_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
11 #include "url/gurl.h" | 11 #include "url/gurl.h" |
12 | 12 |
13 class UpdateManifest { | 13 class UpdateManifest { |
14 public: | 14 public: |
15 | |
16 // An update manifest looks like this: | 15 // An update manifest looks like this: |
17 // | 16 // |
18 // <?xml version="1.0" encoding="UTF-8"?> | 17 // <?xml version="1.0" encoding="UTF-8"?> |
19 // <gupdate xmlns="http://www.google.com/update2/response" protocol="2.0"> | 18 // <gupdate xmlns="http://www.google.com/update2/response" protocol="2.0"> |
20 // <daystart elapsed_seconds="300" /> | 19 // <daystart elapsed_seconds="300" /> |
21 // <app appid="12345" status="ok"> | 20 // <app appid="12345" status="ok"> |
22 // <updatecheck codebase="http://example.com/extension_1.2.3.4.crx" | 21 // <updatecheck codebase="http://example.com/extension_1.2.3.4.crx" |
23 // hash="12345" size="9854" status="ok" version="1.2.3.4" | 22 // hash="12345" size="9854" status="ok" version="1.2.3.4" |
24 // prodversionmin="2.0.143.0" | 23 // prodversionmin="2.0.143.0" |
25 // codebasediff="http://example.com/diff_1.2.3.4.crx" | 24 // codebasediff="http://example.com/diff_1.2.3.4.crx" |
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
86 Results results_; | 85 Results results_; |
87 std::string errors_; | 86 std::string errors_; |
88 | 87 |
89 // Helper function that adds parse error details to our errors_ string. | 88 // Helper function that adds parse error details to our errors_ string. |
90 void ParseError(const char* details, ...); | 89 void ParseError(const char* details, ...); |
91 | 90 |
92 DISALLOW_COPY_AND_ASSIGN(UpdateManifest); | 91 DISALLOW_COPY_AND_ASSIGN(UpdateManifest); |
93 }; | 92 }; |
94 | 93 |
95 #endif // EXTENSIONS_COMMON_UPDATE_MANIFEST_H_ | 94 #endif // EXTENSIONS_COMMON_UPDATE_MANIFEST_H_ |
OLD | NEW |