summaryrefslogtreecommitdiff
path: root/www-client/chromium/files/chromium-string_view-79.patch
blob: 11ad56da8ea0a0163a35cc3c6aac35ab090017d2 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
diff --git a/components/safe_browsing/browser/threat_details.cc b/components/safe_browsing/browser/threat_details.cc
index 05bcd3ff3..5149e911d 100644
--- a/components/safe_browsing/browser/threat_details.cc
+++ b/components/safe_browsing/browser/threat_details.cc
@@ -8,7 +8,6 @@
 
 #include <stddef.h>
 #include <stdint.h>
-#include <string_view>
 #include <unordered_set>
 #include <utility>
 #include <vector>
@@ -18,6 +17,7 @@
 #include "base/lazy_instance.h"
 #include "base/metrics/histogram_macros.h"
 #include "base/stl_util.h"
+#include "base/strings/string_piece.h"
 #include "base/strings/string_util.h"
 #include "base/task/post_task.h"
 #include "components/history/core/browser/history_service.h"
@@ -312,7 +312,7 @@ void TrimElements(const std::set<int> target_ids,
 }
 
 void DisableBackForwardCache(content::RenderFrameHost* rfh,
-                             std::string_view reason) {
+                             base::StringPiece reason) {
   content::WebContents::FromRenderFrameHost(rfh)
       ->GetController()
       .GetBackForwardCache()
diff --git a/content/browser/frame_host/back_forward_cache_impl.cc b/content/browser/frame_host/back_forward_cache_impl.cc
index a7c06949b..3c72b7e9e 100644
--- a/content/browser/frame_host/back_forward_cache_impl.cc
+++ b/content/browser/frame_host/back_forward_cache_impl.cc
@@ -360,7 +360,7 @@ void BackForwardCacheImpl::PostTaskToDestroyEvictedFrames() {
 }
 
 void BackForwardCacheImpl::DisableForRenderFrameHost(GlobalFrameRoutingId id,
-                                                     std::string_view reason) {
+                                                     base::StringPiece reason) {
   DCHECK_CURRENTLY_ON(BrowserThread::UI);
   auto* rfh = RenderFrameHostImpl::FromID(id);
   if (rfh)
diff --git a/content/browser/frame_host/back_forward_cache_impl.h b/content/browser/frame_host/back_forward_cache_impl.h
index 712594a3d..6ed6931a3 100644
--- a/content/browser/frame_host/back_forward_cache_impl.h
+++ b/content/browser/frame_host/back_forward_cache_impl.h
@@ -175,7 +175,7 @@ class CONTENT_EXPORT BackForwardCacheImpl : public BackForwardCache {
 
   // BackForwardCache:
   void DisableForRenderFrameHost(GlobalFrameRoutingId id,
-                                 std::string_view reason) override;
+                                 base::StringPiece reason) override;
 
  private:
   // Destroys all evicted frames in the BackForwardCache.
diff --git a/content/public/browser/back_forward_cache.h b/content/public/browser/back_forward_cache.h
index f7abe8bec..bb7298651 100644
--- a/content/public/browser/back_forward_cache.h
+++ b/content/public/browser/back_forward_cache.h
@@ -5,8 +5,7 @@
 #ifndef CONTENT_PUBLIC_BROWSER_BACK_FORWARD_CACHE_H_
 #define CONTENT_PUBLIC_BROWSER_BACK_FORWARD_CACHE_H_
 
-#include <string_view>
-
+#include "base/strings/string_piece.h"
 #include "content/common/content_export.h"
 #include "content/public/browser/global_routing_id.h"
 
@@ -43,7 +42,7 @@ class CONTENT_EXPORT BackForwardCache {
   // |id|: If no RenderFrameHost can be found for the given id nothing happens.
   // |reason|: Free form string to be used in logging and metrics.
   virtual void DisableForRenderFrameHost(GlobalFrameRoutingId id,
-                                         std::string_view reason) = 0;
+                                         base::StringPiece reason) = 0;
 
  protected:
   BackForwardCache() = default;