| 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" |  | 
|   15  |   13  | 
|   16 class GURL; |   14 class GURL; | 
|   17  |   15  | 
|   18 namespace base { |   16 namespace base { | 
|   19 class DictionaryValue; |  | 
|   20 class FilePath; |   17 class FilePath; | 
|   21 } |   18 } | 
|   22  |   19  | 
|   23 namespace net { |   20 namespace net { | 
|   24 class URLFetcher; |   21 class URLFetcher; | 
|   25 class URLFetcherDelegate; |   22 class URLFetcherDelegate; | 
|   26 class URLRequestContextGetter; |   23 class URLRequestContextGetter; | 
|   27 } |   24 } | 
|   28  |   25  | 
|   29 namespace update_client { |   26 namespace update_client { | 
| (...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
|  110 bool IsValidBrand(const std::string& brand); |  107 bool IsValidBrand(const std::string& brand); | 
|  111  |  108  | 
|  112 // Returns true if the name part of the |attr| parameter matches |  109 // Returns true if the name part of the |attr| parameter matches | 
|  113 // ^[-_a-zA-Z0-9]{1,256}$ and the value part of the |attr| parameter |  110 // ^[-_a-zA-Z0-9]{1,256}$ and the value part of the |attr| parameter | 
|  114 // matches ^[-.,;+_=a-zA-Z0-9]{0,256}$ . |  111 // matches ^[-.,;+_=a-zA-Z0-9]{0,256}$ . | 
|  115 bool IsValidInstallerAttribute(const InstallerAttribute& attr); |  112 bool IsValidInstallerAttribute(const InstallerAttribute& attr); | 
|  116  |  113  | 
|  117 // Removes the unsecure urls in the |urls| parameter. |  114 // Removes the unsecure urls in the |urls| parameter. | 
|  118 void RemoveUnsecureUrls(std::vector<GURL>* urls); |  115 void RemoveUnsecureUrls(std::vector<GURL>* urls); | 
|  119  |  116  | 
|  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  |  | 
|  124 }  // namespace update_client |  117 }  // namespace update_client | 
|  125  |  118  | 
|  126 #endif  // COMPONENTS_UPDATE_CLIENT_UTILS_H_ |  119 #endif  // COMPONENTS_UPDATE_CLIENT_UTILS_H_ | 
| OLD | NEW |