Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(692)

Unified Diff: chrome/browser/apps/guest_view/web_view_browsertest.cc

Issue 889463003: GURL::Replacements methods accept a StringPiece instead of std::string&. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase (fixed some merge conflicts). Created 5 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: chrome/browser/apps/guest_view/web_view_browsertest.cc
diff --git a/chrome/browser/apps/guest_view/web_view_browsertest.cc b/chrome/browser/apps/guest_view/web_view_browsertest.cc
index b875bcc37ad881cc23b14ab824408a20eff782df..a7ef8be795ec7260c255e11b463a2f9916d3ed6a 100644
--- a/chrome/browser/apps/guest_view/web_view_browsertest.cc
+++ b/chrome/browser/apps/guest_view/web_view_browsertest.cc
@@ -355,8 +355,7 @@ class WebViewTest : public extensions::PlatformAppBrowserTest {
content::WebContents** persistent_partition_contents2,
content::WebContents** persistent_partition_contents3) {
GURL::Replacements replace_host;
- std::string host_str("localhost"); // Must stay in scope with replace_host.
- replace_host.SetHostStr(host_str);
+ replace_host.SetHostStr("localhost");
navigate_to_url = navigate_to_url.ReplaceComponents(replace_host);
@@ -624,8 +623,7 @@ class WebViewTest : public extensions::PlatformAppBrowserTest {
content::WebContents* LoadGuest(const std::string& guest_path,
const std::string& app_path) {
GURL::Replacements replace_host;
- std::string host_str("localhost"); // Must stay in scope with replace_host.
- replace_host.SetHostStr(host_str);
+ replace_host.SetHostStr("localhost");
GURL guest_url = embedded_test_server()->GetURL(guest_path);
guest_url = guest_url.ReplaceComponents(replace_host);
@@ -1205,8 +1203,7 @@ IN_PROC_BROWSER_TEST_F(WebViewTest, Shim_TestRemoveWebviewOnExit) {
ASSERT_TRUE(embedder_web_contents);
GURL::Replacements replace_host;
- std::string host_str("localhost"); // Must stay in scope with replace_host.
- replace_host.SetHostStr(host_str);
+ replace_host.SetHostStr("localhost");
std::string guest_path(
"/extensions/platform_apps/web_view/shim/empty_guest.html");
@@ -1396,8 +1393,7 @@ IN_PROC_BROWSER_TEST_F(WebViewTest, DISABLED_CookieIsolation) {
"document.cookie = 'guest2=true; path=/; expires=' + expire + ';';");
GURL::Replacements replace_host;
- std::string host_str("localhost"); // Must stay in scope with replace_host.
- replace_host.SetHostStr(host_str);
+ replace_host.SetHostStr("localhost");
GURL set_cookie_url = embedded_test_server()->GetURL(
"/extensions/platform_apps/isolation/set_cookie.html");
« no previous file with comments | « chrome/browser/apps/app_browsertest.cc ('k') | chrome/browser/apps/guest_view/web_view_interactive_browsertest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698