| 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_UPDATE_CLIENT_UTILS_H_ | 5 #ifndef COMPONENTS_UPDATE_CLIENT_UTILS_H_ |
| 6 #define COMPONENTS_UPDATE_CLIENT_UTILS_H_ | 6 #define COMPONENTS_UPDATE_CLIENT_UTILS_H_ |
| 7 | 7 |
| 8 #include <memory> | 8 #include <memory> |
| 9 #include <string> | 9 #include <string> |
| 10 #include <utility> | 10 #include <utility> |
| 11 #include <vector> | 11 #include <vector> |
| 12 | 12 |
| 13 #include "base/callback_forward.h" |
| 14 #include "components/update_client/update_client.h" |
| 13 | 15 |
| 14 class GURL; | 16 class GURL; |
| 15 | 17 |
| 16 namespace base { | 18 namespace base { |
| 19 class DictionaryValue; |
| 17 class FilePath; | 20 class FilePath; |
| 18 } | 21 } |
| 19 | 22 |
| 20 namespace net { | 23 namespace net { |
| 21 class URLFetcher; | 24 class URLFetcher; |
| 22 class URLFetcherDelegate; | 25 class URLFetcherDelegate; |
| 23 class URLRequestContextGetter; | 26 class URLRequestContextGetter; |
| 24 } | 27 } |
| 25 | 28 |
| 26 namespace update_client { | 29 namespace update_client { |
| (...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 107 bool IsValidBrand(const std::string& brand); | 110 bool IsValidBrand(const std::string& brand); |
| 108 | 111 |
| 109 // Returns true if the name part of the |attr| parameter matches | 112 // Returns true if the name part of the |attr| parameter matches |
| 110 // ^[-_a-zA-Z0-9]{1,256}$ and the value part of the |attr| parameter | 113 // ^[-_a-zA-Z0-9]{1,256}$ and the value part of the |attr| parameter |
| 111 // matches ^[-.,;+_=a-zA-Z0-9]{0,256}$ . | 114 // matches ^[-.,;+_=a-zA-Z0-9]{0,256}$ . |
| 112 bool IsValidInstallerAttribute(const InstallerAttribute& attr); | 115 bool IsValidInstallerAttribute(const InstallerAttribute& attr); |
| 113 | 116 |
| 114 // Removes the unsecure urls in the |urls| parameter. | 117 // Removes the unsecure urls in the |urls| parameter. |
| 115 void RemoveUnsecureUrls(std::vector<GURL>* urls); | 118 void RemoveUnsecureUrls(std::vector<GURL>* urls); |
| 116 | 119 |
| 120 // Adapter function for the old definitions of CrxInstaller::Install until the |
| 121 // component installer code is migrated to use a REsult instead of bool. |
| 122 CrxInstaller::Result InstallFunctionWrapper(base::Callback<bool()> callback); |
| 123 |
| 117 } // namespace update_client | 124 } // namespace update_client |
| 118 | 125 |
| 119 #endif // COMPONENTS_UPDATE_CLIENT_UTILS_H_ | 126 #endif // COMPONENTS_UPDATE_CLIENT_UTILS_H_ |
| OLD | NEW |