Convert base::StringPiece to std::string_view in //components, //base
The changes of this CL are made using the following script. Script: https://issues.chromium.org/issues/40506050#comment343 Bug: 40506050 Change-Id: I469aa87cc8caad4ab6ac2ee6719ca32de6ade26e Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5547981 Reviewed-by: Nico Weber <thakis@chromium.org> Commit-Queue: Nico Weber <thakis@chromium.org> Auto-Submit: Helmut Januschka <helmut@januschka.com> Cr-Commit-Position: refs/heads/main@{#1306787}
This commit is contained in:

committed by
Chromium LUCI CQ

parent
d30dd31a56
commit
6bfb01f54f
base
chrome/browser/permissions
components
prefs
variations
service
version_info
version_ui
visitedlink
common
@ -22,7 +22,7 @@ WrapWithPrefixPrefStore::~WrapWithPrefixPrefStore() {
|
||||
target_pref_store_->RemoveObserver(this);
|
||||
}
|
||||
|
||||
bool WrapWithPrefixPrefStore::GetValue(base::StringPiece key,
|
||||
bool WrapWithPrefixPrefStore::GetValue(std::string_view key,
|
||||
const base::Value** value) const {
|
||||
return target_pref_store_->GetValue(AddDottedPrefix(key), value);
|
||||
}
|
||||
|
@ -7,6 +7,7 @@
|
||||
|
||||
#include <optional>
|
||||
#include <string>
|
||||
#include <string_view>
|
||||
|
||||
#include "base/observer_list.h"
|
||||
#include "components/prefs/persistent_pref_store.h"
|
||||
@ -41,7 +42,7 @@ class COMPONENTS_PREFS_EXPORT WrapWithPrefixPrefStore
|
||||
WrapWithPrefixPrefStore& operator=(const WrapWithPrefixPrefStore&) = delete;
|
||||
|
||||
// PrefStore implementation.
|
||||
bool GetValue(base::StringPiece key,
|
||||
bool GetValue(std::string_view key,
|
||||
const base::Value** result) const override;
|
||||
base::Value::Dict GetValues() const override;
|
||||
void AddObserver(PrefStore::Observer* observer) override;
|
||||
|
Reference in New Issue
Block a user