| 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 26 matching lines...) Expand all Loading... |
| 37 // <hw physmemory="16"/> | 37 // <hw physmemory="16"/> |
| 38 // <os platform="win" version="6.1" arch="x86"/> | 38 // <os platform="win" version="6.1" arch="x86"/> |
| 39 // ... REQUEST BODY ... | 39 // ... REQUEST BODY ... |
| 40 // </request> | 40 // </request> |
| 41 | 41 |
| 42 // Builds a protocol request string by creating the outer envelope for | 42 // Builds a protocol request string by creating the outer envelope for |
| 43 // the request and including the request body specified as a parameter. | 43 // the request and including the request body specified as a parameter. |
| 44 // If specified, |additional_attributes| are appended as attributes of the | 44 // If specified, |additional_attributes| are appended as attributes of the |
| 45 // request element. The additional attributes have to be well-formed for | 45 // request element. The additional attributes have to be well-formed for |
| 46 // insertion in the request element. | 46 // insertion in the request element. |
| 47 std::string BuildProtocolRequest(const std::string& request_body, | 47 std::string BuildProtocolRequest(const std::string& chrome_version, |
| 48 const std::string& platform_name, |
| 49 const std::string& request_body, |
| 48 const std::string& additional_attributes); | 50 const std::string& additional_attributes); |
| 49 | 51 |
| 50 // Sends a protocol request to the the service endpoint specified by |url|. | 52 // Sends a protocol request to the the service endpoint specified by |url|. |
| 51 // The body of the request is provided by |protocol_request| and it is | 53 // The body of the request is provided by |protocol_request| and it is |
| 52 // expected to contain XML data. The caller owns the returned object. | 54 // expected to contain XML data. The caller owns the returned object. |
| 53 net::URLFetcher* SendProtocolRequest( | 55 net::URLFetcher* SendProtocolRequest( |
| 54 const GURL& url, | 56 const GURL& url, |
| 55 const std::string& protocol_request, | 57 const std::string& protocol_request, |
| 56 net::URLFetcherDelegate* url_fetcher_delegate, | 58 net::URLFetcherDelegate* url_fetcher_delegate, |
| 57 net::URLRequestContextGetter* url_request_context_getter); | 59 net::URLRequestContextGetter* url_request_context_getter); |
| (...skipping 18 matching lines...) Expand all Loading... |
| 76 // Returns true if the file and the empty directory are deleted. | 78 // Returns true if the file and the empty directory are deleted. |
| 77 bool DeleteFileAndEmptyParentDirectory(const base::FilePath& filepath); | 79 bool DeleteFileAndEmptyParentDirectory(const base::FilePath& filepath); |
| 78 | 80 |
| 79 // Returns the component id of the |component|. The component id is in a | 81 // Returns the component id of the |component|. The component id is in a |
| 80 // format similar with the format of an extension id. | 82 // format similar with the format of an extension id. |
| 81 std::string GetCrxComponentID(const CrxComponent& component); | 83 std::string GetCrxComponentID(const CrxComponent& component); |
| 82 | 84 |
| 83 } // namespace component_updater | 85 } // namespace component_updater |
| 84 | 86 |
| 85 #endif // CHROME_BROWSER_COMPONENT_UPDATER_COMPONENT_UPDATER_UTILS_H_ | 87 #endif // CHROME_BROWSER_COMPONENT_UPDATER_COMPONENT_UPDATER_UTILS_H_ |
| OLD | NEW |