OLD | NEW |
---|---|
(Empty) | |
1 // Copyright (c) 2013 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. | |
4 | |
5 #ifndef CHROME_BROWSER_COMPONENT_UPDATER_COMPONENT_UPDATER_UTILS_H_ | |
6 #define CHROME_BROWSER_COMPONENT_UPDATER_COMPONENT_UPDATER_UTILS_H_ | |
7 | |
8 #include <string> | |
9 | |
10 class GURL; | |
11 | |
12 namespace net { | |
13 class URLFetcher; | |
14 class URLFetcherDelegate; | |
15 class URLRequestContextGetter; | |
16 } | |
17 | |
18 namespace component_updater { | |
19 | |
20 // An update protocol request starts with a common preamble which includes | |
21 // version and platform information for Chrome and the operating system, | |
22 // followed by a request body, which is the actual payload of the request. | |
23 // For example: | |
24 // | |
25 // <?xml version="1.0" encoding="UTF-8"?> | |
26 // <request protocol="3.0" version="chrome-32.0.1.0" prodversion="32.0.1.0" | |
27 // requestid="{7383396D-B4DD-46E1-9104-AAC6B918E792}" | |
28 // updaterchannel="canary" arch="x86" nacl_arch="x86-64"> | |
29 // <os platform="win" version="6.1" arch="x86"/> | |
30 // ... REQUEST BODY ... | |
31 // </request> | |
32 | |
33 // Builds a protocol request string by creating the outer envelope for | |
34 // the request and including the request body specified as a parameter. | |
35 std::string BuildProtocolRequest(const std::string& request_body); | |
36 | |
37 // Sends a protocol request to the the service endpoind specified by |url|. | |
waffles
2013/11/18 22:15:59
endpoind -> endpoint
Sorin Jianu
2013/11/19 04:25:45
On 2013/11/18 22:15:59, waffles wrote:
> endpoind
| |
38 // The body of the request is provided by |protocol_request| and it is | |
39 // expected to contain XML data. The caller owns the returned object. | |
40 net::URLFetcher* SendProtocolRequest( | |
41 const GURL& url, | |
42 const std::string& protocol_request, | |
43 net::URLFetcherDelegate* url_fetcher_delegate, | |
44 net::URLRequestContextGetter* url_request_context_getter); | |
45 | |
46 } // namespace component_updater | |
47 | |
48 #endif // CHROME_BROWSER_COMPONENT_UPDATER_COMPONENT_UPDATER_UTILS_H_ | |
OLD | NEW |