Chromium Code Reviews| 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 <string> | 8 #include <string> |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| (...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 92 std::string GetCrxComponentID(const CrxComponent& component); | 92 std::string GetCrxComponentID(const CrxComponent& component); |
| 93 | 93 |
| 94 // Returns true if the actual SHA-256 hash of the |filepath| matches the | 94 // Returns true if the actual SHA-256 hash of the |filepath| matches the |
| 95 // |expected_hash|. | 95 // |expected_hash|. |
| 96 bool VerifyFileHash256(const base::FilePath& filepath, | 96 bool VerifyFileHash256(const base::FilePath& filepath, |
| 97 const std::string& expected_hash); | 97 const std::string& expected_hash); |
| 98 | 98 |
| 99 // Returns true if the |brand| parameter matches ^([a-zA-Z]{4})?$ . | 99 // Returns true if the |brand| parameter matches ^([a-zA-Z]{4})?$ . |
| 100 bool IsValidBrand(const std::string& brand); | 100 bool IsValidBrand(const std::string& brand); |
| 101 | 101 |
| 102 // Returns true if the |ap| parameter matches ^([-+_=a-zA-Z0-9]{0,256})$ . | |
|
waffles
2016/04/08 21:06:16
Nit: no need for parens.
Sorin Jianu
2016/04/08 21:13:42
Done.
| |
| 103 bool IsValidAp(const std::string& ap); | |
| 104 | |
| 102 // Removes the unsecure urls in the |urls| parameter. | 105 // Removes the unsecure urls in the |urls| parameter. |
| 103 void RemoveUnsecureUrls(std::vector<GURL>* urls); | 106 void RemoveUnsecureUrls(std::vector<GURL>* urls); |
| 104 | 107 |
| 105 } // namespace update_client | 108 } // namespace update_client |
| 106 | 109 |
| 107 #endif // COMPONENTS_UPDATE_CLIENT_UTILS_H_ | 110 #endif // COMPONENTS_UPDATE_CLIENT_UTILS_H_ |
| OLD | NEW |