| 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 #include "components/update_client/utils.h" | 5 #include "components/update_client/utils.h" |
| 6 | 6 |
| 7 #include <stdint.h> | 7 #include <stdint.h> |
| 8 #include <cmath> | 8 #include <cmath> |
| 9 | 9 |
| 10 #include "base/files/file_path.h" | 10 #include "base/files/file_path.h" |
| (...skipping 170 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 181 const base::FilePath dirname(filepath.DirName()); | 181 const base::FilePath dirname(filepath.DirName()); |
| 182 if (!base::IsDirectoryEmpty(dirname)) | 182 if (!base::IsDirectoryEmpty(dirname)) |
| 183 return true; | 183 return true; |
| 184 | 184 |
| 185 return base::DeleteFile(dirname, false); | 185 return base::DeleteFile(dirname, false); |
| 186 } | 186 } |
| 187 | 187 |
| 188 std::string GetCrxComponentID(const CrxComponent& component) { | 188 std::string GetCrxComponentID(const CrxComponent& component) { |
| 189 const size_t kCrxIdSize = 16; | 189 const size_t kCrxIdSize = 16; |
| 190 CHECK_GE(component.pk_hash.size(), kCrxIdSize); | 190 CHECK_GE(component.pk_hash.size(), kCrxIdSize); |
| 191 return HexStringToID(base::StringToLowerASCII( | 191 return HexStringToID(base::ToLowerASCII( |
| 192 base::HexEncode(&component.pk_hash[0], kCrxIdSize))); | 192 base::HexEncode(&component.pk_hash[0], kCrxIdSize))); |
| 193 } | 193 } |
| 194 | 194 |
| 195 } // namespace update_client | 195 } // namespace update_client |
| OLD | NEW |