0

Remove base::StringPiece usage in screen_ai_ocr_perf_test

Convert from base::StringPiece to std::string_view. Fix a nit along the
way.

Bug: 40506050
Change-Id: Ibdf5e977fae9a0c3b4ea86a1c3326a0cf8e6b5b0
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5653995
Commit-Queue: Lei Zhang <thestig@chromium.org>
Reviewed-by: Ramin Halavati <rhalavati@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1319609}
This commit is contained in:
Lei Zhang
2024-06-26 07:47:54 +00:00
committed by Chromium LUCI CQ
parent 4b55314c38
commit 581c3934b4

@@ -4,6 +4,7 @@
#include <memory>
#include <string>
#include <string_view>
#include <vector>
#include "base/check.h"
@@ -14,7 +15,6 @@
#include "base/files/file_util.h"
#include "base/json/json_file_value_serializer.h"
#include "base/logging.h"
#include "base/strings/string_piece.h"
#include "base/strings/string_split.h"
#include "base/test/bind.h"
#include "base/time/time.h"
@@ -30,7 +30,7 @@ namespace screen_ai {
namespace {
constexpr const char kUsageMessage[] =
constexpr char kUsageMessage[] =
R"(Usage:
screen_ai_ocr_perf [options]
@@ -120,7 +120,7 @@ class OcrTestEnvironment : public ::testing::Environment {
CHECK(base::ReadFileToString(file_paths_path, &file_content))
<< "Could not read list of files for " << kFilePathsFileName;
std::vector<base::StringPiece> files_list = base::SplitStringPiece(
std::vector<std::string_view> files_list = base::SplitStringPiece(
file_content, "\n", base::TRIM_WHITESPACE, base::SPLIT_WANT_ALL);
CHECK(!files_list.empty())
<< "Could not parse files list for " << kFilePathsFileName;