Convert base::StringPiece to std::string_view in //components 3/5

The changes of this CL are made using the following script.
Script: https://issues.chromium.org/issues/40506050#comment343

Bug: 40506050
Change-Id: I7b21541a0723d312206c786d3af570f552ceef4e
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5498922
Auto-Submit: Helmut Januschka <[email protected]>
Commit-Queue: Helmut Januschka <[email protected]>
Reviewed-by: Nico Weber <[email protected]>
Cr-Commit-Position: refs/heads/main@{#1295637}
diff --git a/components/prefs/overlay_user_pref_store.cc b/components/prefs/overlay_user_pref_store.cc
index ed82272..a17559b 100644
--- a/components/prefs/overlay_user_pref_store.cc
+++ b/components/prefs/overlay_user_pref_store.cc
@@ -7,12 +7,12 @@
 #include <memory>
 #include <ostream>
 #include <string>
+#include <string_view>
 #include <utility>
 
 #include "base/memory/ptr_util.h"
 #include "base/memory/raw_ptr.h"
 #include "base/observer_list.h"
-#include "base/strings/string_piece.h"
 #include "base/values.h"
 #include "components/prefs/in_memory_pref_store.h"
 
@@ -76,7 +76,7 @@
          ephemeral_user_pref_store_->IsInitializationComplete();
 }
 
-bool OverlayUserPrefStore::GetValue(base::StringPiece key,
+bool OverlayUserPrefStore::GetValue(std::string_view key,
                                     const base::Value** result) const {
   // If the |key| shall NOT be stored in the ephemeral store, there must not
   // be an entry.
@@ -241,6 +241,6 @@
 }
 
 bool OverlayUserPrefStore::ShallBeStoredInPersistent(
-    base::StringPiece key) const {
+    std::string_view key) const {
   return persistent_names_set_.find(key) != persistent_names_set_.end();
 }