| 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 COMPONENTS_COMPONENT_UPDATER_COMPONENT_UPDATER_UTILS_H_ | 5 #ifndef COMPONENTS_UPDATE_CLIENT_UTILS_H_ |
| 6 #define COMPONENTS_COMPONENT_UPDATER_COMPONENT_UPDATER_UTILS_H_ | 6 #define COMPONENTS_UPDATE_CLIENT_UTILS_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 | 9 |
| 10 struct CrxComponent; | |
| 11 class GURL; | 10 class GURL; |
| 12 | 11 |
| 13 namespace base { | 12 namespace base { |
| 14 class FilePath; | 13 class FilePath; |
| 15 } | 14 } |
| 16 | 15 |
| 17 namespace net { | 16 namespace net { |
| 18 class URLFetcher; | 17 class URLFetcher; |
| 19 class URLFetcherDelegate; | 18 class URLFetcherDelegate; |
| 20 class URLRequestContextGetter; | 19 class URLRequestContextGetter; |
| 21 } | 20 } |
| 22 | 21 |
| 23 namespace component_updater { | 22 namespace update_client { |
| 24 | 23 |
| 25 class Configurator; | 24 class Configurator; |
| 25 struct CrxComponent; |
| 26 struct CrxUpdateItem; | 26 struct CrxUpdateItem; |
| 27 | 27 |
| 28 // An update protocol request starts with a common preamble which includes | 28 // An update protocol request starts with a common preamble which includes |
| 29 // version and platform information for Chrome and the operating system, | 29 // version and platform information for Chrome and the operating system, |
| 30 // followed by a request body, which is the actual payload of the request. | 30 // followed by a request body, which is the actual payload of the request. |
| 31 // For example: | 31 // For example: |
| 32 // | 32 // |
| 33 // <?xml version="1.0" encoding="UTF-8"?> | 33 // <?xml version="1.0" encoding="UTF-8"?> |
| 34 // <request protocol="3.0" version="chrome-32.0.1.0" prodversion="32.0.1.0" | 34 // <request protocol="3.0" version="chrome-32.0.1.0" prodversion="32.0.1.0" |
| 35 // requestid="{7383396D-B4DD-46E1-9104-AAC6B918E792}" | 35 // requestid="{7383396D-B4DD-46E1-9104-AAC6B918E792}" |
| (...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 78 | 78 |
| 79 // Deletes the file and its directory, if the directory is empty. If the | 79 // Deletes the file and its directory, if the directory is empty. If the |
| 80 // parent directory is not empty, the function ignores deleting the directory. | 80 // parent directory is not empty, the function ignores deleting the directory. |
| 81 // Returns true if the file and the empty directory are deleted. | 81 // Returns true if the file and the empty directory are deleted. |
| 82 bool DeleteFileAndEmptyParentDirectory(const base::FilePath& filepath); | 82 bool DeleteFileAndEmptyParentDirectory(const base::FilePath& filepath); |
| 83 | 83 |
| 84 // Returns the component id of the |component|. The component id is in a | 84 // Returns the component id of the |component|. The component id is in a |
| 85 // format similar with the format of an extension id. | 85 // format similar with the format of an extension id. |
| 86 std::string GetCrxComponentID(const CrxComponent& component); | 86 std::string GetCrxComponentID(const CrxComponent& component); |
| 87 | 87 |
| 88 } // namespace component_updater | 88 } // namespace update_client |
| 89 | 89 |
| 90 #endif // COMPONENTS_COMPONENT_UPDATER_COMPONENT_UPDATER_UTILS_H_ | 90 #endif // COMPONENTS_UPDATE_CLIENT_UTILS_H_ |
| OLD | NEW |