[bindings] Use std::string instead StringPiece as ScripId type
Changes to use std:string as ScriptId type which has been changed to
base::StringPiece on CastWebContents. Using base::StringPiece breaks the
normal behavior of injecting JS bindings and the browsertest. Changing
it back to std::string fixed the problem.
Bug: internal b/163431947, b/132986916
Test: cast_shell_internal_browsertest, CQ
Change-Id: I2a4cef5f208880816a4be3068e4e460dd9cf9fcf
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2350314
Reviewed-by: Sean Topping <[email protected]>
Auto-Submit: Jiawei Li <[email protected]>
Commit-Queue: Jiawei Li <[email protected]>
Cr-Commit-Position: refs/heads/master@{#797101}
diff --git a/chromecast/browser/cast_web_contents.h b/chromecast/browser/cast_web_contents.h
index 171cddf..1d02d99 100644
--- a/chromecast/browser/cast_web_contents.h
+++ b/chromecast/browser/cast_web_contents.h
@@ -14,7 +14,6 @@
#include "base/optional.h"
#include "base/process/process.h"
#include "base/strings/string16.h"
-#include "base/strings/string_piece_forward.h"
#include "chromecast/common/mojom/feature_manager.mojom.h"
#include "content/public/common/media_playback_renderer_type.mojom.h"
#include "services/service_manager/public/cpp/binder_registry.h"
@@ -343,7 +342,7 @@
// Returns the script injector instance, which injects scripts at page load
// time.
- virtual on_load_script_injector::OnLoadScriptInjectorHost<base::StringPiece>*
+ virtual on_load_script_injector::OnLoadScriptInjectorHost<std::string>*
script_injector() = 0;
// Injects on-load scripts into the WebContents' main frame.