Replace std::copy() with base::ranges::copy(): content/
Bug: 1368812 Change-Id: I45c91791286b70a9095b3cf0767970136b15da42 AX-Relnotes: n/a Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3989488 Auto-Submit: Peter Kasting <pkasting@chromium.org> Reviewed-by: Camille Lamy <clamy@chromium.org> Commit-Queue: Camille Lamy <clamy@chromium.org> Cr-Commit-Position: refs/heads/main@{#1064851}
This commit is contained in:

committed by
Chromium LUCI CQ

parent
6dd67b089a
commit
2a5ae87eba
content
browser
accessibility
renderer
shell
@ -10,6 +10,7 @@
|
||||
|
||||
#include "base/no_destructor.h"
|
||||
#include "base/process/process_handle.h"
|
||||
#include "base/ranges/algorithm.h"
|
||||
#include "base/strings/stringprintf.h"
|
||||
#include "content/browser/accessibility/browser_accessibility_auralinux.h"
|
||||
#include "ui/accessibility/platform/ax_platform_tree_manager.h"
|
||||
@ -393,8 +394,7 @@ void AccessibilityEventRecorderAuraLinux::ProcessATSPIEvent(
|
||||
g_array_free(state_array, TRUE);
|
||||
g_object_unref(atspi_states);
|
||||
output << " ";
|
||||
std::copy(states.begin(), states.end(),
|
||||
std::ostream_iterator<std::string>(output, ", "));
|
||||
base::ranges::copy(states, std::ostream_iterator<std::string>(output, ", "));
|
||||
|
||||
OnEvent(output.str());
|
||||
}
|
||||
|
@ -5,6 +5,7 @@
|
||||
#include <stddef.h>
|
||||
#include <stdint.h>
|
||||
|
||||
#include <algorithm>
|
||||
#include <memory>
|
||||
#include <tuple>
|
||||
|
||||
|
@ -17,6 +17,7 @@
|
||||
#include "base/memory/unsafe_shared_memory_region.h"
|
||||
#include "base/memory/writable_shared_memory_region.h"
|
||||
#include "base/process/process.h"
|
||||
#include "base/ranges/algorithm.h"
|
||||
#include "build/build_config.h"
|
||||
#include "components/services/storage/test_api/test_api.h"
|
||||
#include "content/public/child/child_thread.h"
|
||||
@ -81,8 +82,8 @@ class TestUtilityServiceImpl : public mojom::TestService {
|
||||
base::MappedReadOnlyRegion map_and_region =
|
||||
base::ReadOnlySharedMemoryRegion::Create(message.size());
|
||||
CHECK(map_and_region.IsValid());
|
||||
std::copy(message.begin(), message.end(),
|
||||
map_and_region.mapping.GetMemoryAsSpan<char>().begin());
|
||||
base::ranges::copy(message,
|
||||
map_and_region.mapping.GetMemoryAsSpan<char>().begin());
|
||||
std::move(callback).Run(std::move(map_and_region.region));
|
||||
}
|
||||
|
||||
@ -93,8 +94,7 @@ class TestUtilityServiceImpl : public mojom::TestService {
|
||||
CHECK(region.IsValid());
|
||||
base::WritableSharedMemoryMapping mapping = region.Map();
|
||||
CHECK(mapping.IsValid());
|
||||
std::copy(message.begin(), message.end(),
|
||||
mapping.GetMemoryAsSpan<char>().begin());
|
||||
base::ranges::copy(message, mapping.GetMemoryAsSpan<char>().begin());
|
||||
std::move(callback).Run(std::move(region));
|
||||
}
|
||||
|
||||
@ -105,8 +105,7 @@ class TestUtilityServiceImpl : public mojom::TestService {
|
||||
CHECK(region.IsValid());
|
||||
base::WritableSharedMemoryMapping mapping = region.Map();
|
||||
CHECK(mapping.IsValid());
|
||||
std::copy(message.begin(), message.end(),
|
||||
mapping.GetMemoryAsSpan<char>().begin());
|
||||
base::ranges::copy(message, mapping.GetMemoryAsSpan<char>().begin());
|
||||
std::move(callback).Run(std::move(region));
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user