code-health: StringPiece -> std::string_view in chromeos dirs
Bug: 40506050 Change-Id: Iec404b435a0a028ce07afa0b6668f46ccd1fd0d1 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5374032 Reviewed-by: Nico Weber <thakis@chromium.org> Commit-Queue: Nico Weber <thakis@chromium.org> Auto-Submit: Giovanni Ortuno Urquidi <ortuno@chromium.org> Owners-Override: Nico Weber <thakis@chromium.org> Cr-Commit-Position: refs/heads/main@{#1274916}
This commit is contained in:

committed by
Chromium LUCI CQ

parent
5242369dff
commit
9f07cd0a93
chrome/test/base/chromeos/crosier
media/capture/video/chromeos
rlz/chromeos/lib
@ -4,6 +4,8 @@
|
||||
|
||||
#include "chrome/test/base/chromeos/crosier/chromeos_test_launcher.h"
|
||||
|
||||
#include <string_view>
|
||||
|
||||
#include "base/test/task_environment.h"
|
||||
#include "chrome/app/chrome_crash_reporter_client.h"
|
||||
#include "chrome/browser/chrome_content_browser_client.h"
|
||||
@ -25,7 +27,7 @@ auto RunEchoService(mojo::PendingReceiver<echo::mojom::EchoService> receiver) {
|
||||
class BrowserTestChromeOSContentBrowserClient
|
||||
: public ChromeContentBrowserClient {
|
||||
public:
|
||||
bool CreateThreadPool(base::StringPiece name) override {
|
||||
bool CreateThreadPool(std::string_view name) override {
|
||||
base::test::TaskEnvironment::CreateThreadPool();
|
||||
return true;
|
||||
}
|
||||
|
@ -7,6 +7,7 @@
|
||||
#include <fcntl.h>
|
||||
#include <sys/uio.h>
|
||||
|
||||
#include <string_view>
|
||||
#include <utility>
|
||||
|
||||
#include "base/containers/flat_set.h"
|
||||
@ -19,7 +20,6 @@
|
||||
#include "base/ranges/algorithm.h"
|
||||
#include "base/strings/strcat.h"
|
||||
#include "base/strings/string_number_conversions.h"
|
||||
#include "base/strings/string_piece.h"
|
||||
#include "base/strings/string_split.h"
|
||||
#include "base/strings/string_util.h"
|
||||
#include "base/task/bind_post_task.h"
|
||||
@ -126,7 +126,7 @@ bool IsVividLoaded() {
|
||||
return false;
|
||||
}
|
||||
|
||||
std::vector<base::StringPiece> lines = base::SplitStringPieceUsingSubstr(
|
||||
std::vector<std::string_view> lines = base::SplitStringPieceUsingSubstr(
|
||||
output, "\n", base::KEEP_WHITESPACE, base::SPLIT_WANT_NONEMPTY);
|
||||
|
||||
return base::ranges::any_of(lines, [](const auto& line) {
|
||||
|
@ -5,6 +5,7 @@
|
||||
#include "rlz/chromeos/lib/rlz_value_store_chromeos.h"
|
||||
|
||||
#include <algorithm>
|
||||
#include <string_view>
|
||||
#include <tuple>
|
||||
|
||||
#include "base/base_paths.h"
|
||||
@ -19,7 +20,6 @@
|
||||
#include "base/memory/ptr_util.h"
|
||||
#include "base/path_service.h"
|
||||
#include "base/strings/string_number_conversions.h"
|
||||
#include "base/strings/string_piece.h"
|
||||
#include "base/task/sequenced_task_runner.h"
|
||||
#include "base/values.h"
|
||||
#include "chromeos/ash/components/dbus/dbus_thread_manager.h"
|
||||
@ -375,7 +375,7 @@ bool RlzValueStoreChromeOS::IsStatefulEvent(Product product,
|
||||
if (strcmp(event_rlz, "CAF") == 0) {
|
||||
ash::system::StatisticsProvider* stats =
|
||||
ash::system::StatisticsProvider::GetInstance();
|
||||
if (const std::optional<base::StringPiece> should_send_rlz_ping_value =
|
||||
if (const std::optional<std::string_view> should_send_rlz_ping_value =
|
||||
stats->GetMachineStatistic(ash::system::kShouldSendRlzPingKey)) {
|
||||
if (should_send_rlz_ping_value ==
|
||||
ash::system::kShouldSendRlzPingValueFalse) {
|
||||
|
Reference in New Issue
Block a user