Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit bdb4351b authored by Kokoa Matsuda's avatar Kokoa Matsuda
Browse files

Replace libchrome HexStringToInt with android-base's one

This change is to remove the direct dependency on libchrome.
This change is very mechanical, no change in program behavior.

Test: m .
Bug: 360917504
Change-Id: I08079869e89af0bbb3e496ec2df9ec81c610ade4
parent 1ba40dee
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -15,6 +15,7 @@
 */
#include "metrics/chromeos/metrics_event.h"

#include <android-base/parseint.h>
#include <base/files/file_path.h>
#include <base/files/file_util.h>
#include <base/strings/pattern.h>
@@ -665,7 +666,7 @@ static int64_t GetChipsetInfoId(const char* path, const char* file) {
  int64_t id;

  if (base::ReadFileToString(base::FilePath(path).Append(file), &content)) {
    if (base::HexStringToInt64(base::CollapseWhitespaceASCII(content, false), &id)) {
    if (android::base::ParseInt(base::CollapseWhitespaceASCII(content, false), &id)) {
      return id;
    }
  }