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_COMPONENT_UPDATER_COMPONENT_UPDATER_UTILS_H_ | 5 #ifndef CHROME_BROWSER_COMPONENT_UPDATER_COMPONENT_UPDATER_UTILS_H_ |
6 #define CHROME_BROWSER_COMPONENT_UPDATER_COMPONENT_UPDATER_UTILS_H_ | 6 #define CHROME_BROWSER_COMPONENT_UPDATER_COMPONENT_UPDATER_UTILS_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 | 9 |
10 struct CrxComponent; | 10 struct CrxComponent; |
(...skipping 16 matching lines...) Expand all Loading... |
27 // An update protocol request starts with a common preamble which includes | 27 // An update protocol request starts with a common preamble which includes |
28 // version and platform information for Chrome and the operating system, | 28 // version and platform information for Chrome and the operating system, |
29 // followed by a request body, which is the actual payload of the request. | 29 // followed by a request body, which is the actual payload of the request. |
30 // For example: | 30 // For example: |
31 // | 31 // |
32 // <?xml version="1.0" encoding="UTF-8"?> | 32 // <?xml version="1.0" encoding="UTF-8"?> |
33 // <request protocol="3.0" version="chrome-32.0.1.0" prodversion="32.0.1.0" | 33 // <request protocol="3.0" version="chrome-32.0.1.0" prodversion="32.0.1.0" |
34 // requestid="{7383396D-B4DD-46E1-9104-AAC6B918E792}" | 34 // requestid="{7383396D-B4DD-46E1-9104-AAC6B918E792}" |
35 // updaterchannel="canary" arch="x86" nacl_arch="x86-64" | 35 // updaterchannel="canary" arch="x86" nacl_arch="x86-64" |
36 // ADDITIONAL ATTRIBUTES> | 36 // ADDITIONAL ATTRIBUTES> |
| 37 // <hw physmemory="16"/> |
37 // <os platform="win" version="6.1" arch="x86"/> | 38 // <os platform="win" version="6.1" arch="x86"/> |
38 // ... REQUEST BODY ... | 39 // ... REQUEST BODY ... |
39 // </request> | 40 // </request> |
40 | 41 |
41 // Builds a protocol request string by creating the outer envelope for | 42 // Builds a protocol request string by creating the outer envelope for |
42 // the request and including the request body specified as a parameter. | 43 // the request and including the request body specified as a parameter. |
43 // If specified, |additional_attributes| are appended as attributes of the | 44 // If specified, |additional_attributes| are appended as attributes of the |
44 // request element. The additional attributes have to be well-formed for | 45 // request element. The additional attributes have to be well-formed for |
45 // insertion in the request element. | 46 // insertion in the request element. |
46 std::string BuildProtocolRequest(const std::string& request_body, | 47 std::string BuildProtocolRequest(const std::string& request_body, |
(...skipping 28 matching lines...) Expand all Loading... |
75 // Returns true if the file and the empty directory are deleted. | 76 // Returns true if the file and the empty directory are deleted. |
76 bool DeleteFileAndEmptyParentDirectory(const base::FilePath& filepath); | 77 bool DeleteFileAndEmptyParentDirectory(const base::FilePath& filepath); |
77 | 78 |
78 // Returns the component id of the |component|. The component id is in a | 79 // Returns the component id of the |component|. The component id is in a |
79 // format similar with the format of an extension id. | 80 // format similar with the format of an extension id. |
80 std::string GetCrxComponentID(const CrxComponent& component); | 81 std::string GetCrxComponentID(const CrxComponent& component); |
81 | 82 |
82 } // namespace component_updater | 83 } // namespace component_updater |
83 | 84 |
84 #endif // CHROME_BROWSER_COMPONENT_UPDATER_COMPONENT_UPDATER_UTILS_H_ | 85 #endif // CHROME_BROWSER_COMPONENT_UPDATER_COMPONENT_UPDATER_UTILS_H_ |
OLD | NEW |