| 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 | 9 |
| 10 #include "base/memory/scoped_ptr.h" | 10 #include "base/memory/scoped_ptr.h" |
| (...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 88 | 88 |
| 89 // Returns the component id of the |component|. The component id is in a | 89 // Returns the component id of the |component|. The component id is in a |
| 90 // format similar with the format of an extension id. | 90 // format similar with the format of an extension id. |
| 91 std::string GetCrxComponentID(const CrxComponent& component); | 91 std::string GetCrxComponentID(const CrxComponent& component); |
| 92 | 92 |
| 93 // Returns true if the actual SHA-256 hash of the |filepath| matches the | 93 // Returns true if the actual SHA-256 hash of the |filepath| matches the |
| 94 // |expected_hash|. | 94 // |expected_hash|. |
| 95 bool VerifyFileHash256(const base::FilePath& filepath, | 95 bool VerifyFileHash256(const base::FilePath& filepath, |
| 96 const std::string& expected_hash); | 96 const std::string& expected_hash); |
| 97 | 97 |
| 98 // Returns true if the |brand| parameter matches ^([a-zA-Z]{4})?$ . |
| 99 bool IsValidBrand(const std::string& brand); |
| 100 |
| 98 } // namespace update_client | 101 } // namespace update_client |
| 99 | 102 |
| 100 #endif // COMPONENTS_UPDATE_CLIENT_UTILS_H_ | 103 #endif // COMPONENTS_UPDATE_CLIENT_UTILS_H_ |
| OLD | NEW |