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

Unified Diff: content/browser/session_history_browsertest.cc

Issue 1354363002: Cleanup: Pass std::string as const reference from content/ (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 3 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: content/browser/session_history_browsertest.cc
diff --git a/content/browser/session_history_browsertest.cc b/content/browser/session_history_browsertest.cc
index 6578676ff5bd4ca6e34d43b6ff1ac624dc2231e0..f2d2e04d05104b712cb25637bbac66df32387d1a 100644
--- a/content/browser/session_history_browsertest.cc
+++ b/content/browser/session_history_browsertest.cc
@@ -57,14 +57,14 @@ class SessionHistoryTest : public ContentBrowserTest {
}
// Simulate clicking a link. Only works on the frames.html testserver page.
- void ClickLink(std::string node_id) {
+ void ClickLink(const std::string& node_id) {
GURL url("javascript:clickLink('" + node_id + "')");
NavigateToURL(shell(), url);
}
// Simulate filling in form data. Only works on the frames.html page with
// subframe = form.html, and on form.html itself.
- void FillForm(std::string node_id, std::string value) {
+ void FillForm(const std::string& node_id, const std::string& value) {
GURL url("javascript:fillForm('" + node_id + "', '" + value + "')");
// This will return immediately, but since the JS executes synchronously
// on the renderer, it will complete before the next navigate message is
@@ -74,13 +74,13 @@ class SessionHistoryTest : public ContentBrowserTest {
// Simulate submitting a form. Only works on the frames.html page with
// subframe = form.html, and on form.html itself.
- void SubmitForm(std::string node_id) {
+ void SubmitForm(const std::string& node_id) {
GURL url("javascript:submitForm('" + node_id + "')");
NavigateToURL(shell(), url);
}
// Navigate session history using history.go(distance).
- void JavascriptGo(std::string distance) {
+ void JavascriptGo(const std::string& distance) {
GURL url("javascript:history.go('" + distance + "')");
NavigateToURL(shell(), url);
}
@@ -93,7 +93,7 @@ class SessionHistoryTest : public ContentBrowserTest {
return shell()->web_contents()->GetLastCommittedURL();
}
- GURL GetURL(const std::string file) {
+ GURL GetURL(const std::string& file) {
return embedded_test_server()->GetURL(
std::string("/session_history/") + file);
}

Powered by Google App Engine
This is Rietveld 408576698