summaryrefslogtreecommitdiffstats
path: root/content/child/resource_dispatcher_unittest.cc
diff options
context:
space:
mode:
authorki.stfu <ki.stfu@gmail.com>2015-09-27 01:37:01 -0700
committerCommit bot <commit-bot@chromium.org>2015-09-27 08:37:48 +0000
commit7cf10ca7017bed4b6fac3596b9b9080bf208c7d4 (patch)
tree2f5d88eb522ab2efb40956f443712ac507cf7f4f /content/child/resource_dispatcher_unittest.cc
parent9629e6e8d65195f31036839fe20583ea77eab26e (diff)
downloadchromium_src-7cf10ca7017bed4b6fac3596b9b9080bf208c7d4.zip
chromium_src-7cf10ca7017bed4b6fac3596b9b9080bf208c7d4.tar.gz
chromium_src-7cf10ca7017bed4b6fac3596b9b9080bf208c7d4.tar.bz2
Cleanup: Pass std::string as const reference from content/
Passing std::string by reference can prevent extra copying of object. BUG=367418 TEST= R=jam@chromium.org,jochen@chromium.org,kinuko@chromium.org Review URL: https://codereview.chromium.org/1354363002 Cr-Commit-Position: refs/heads/master@{#351007}
Diffstat (limited to 'content/child/resource_dispatcher_unittest.cc')
-rw-r--r--content/child/resource_dispatcher_unittest.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/content/child/resource_dispatcher_unittest.cc b/content/child/resource_dispatcher_unittest.cc
index e449c334..0f26c82 100644
--- a/content/child/resource_dispatcher_unittest.cc
+++ b/content/child/resource_dispatcher_unittest.cc
@@ -299,7 +299,7 @@ class ResourceDispatcherTest : public testing::Test, public IPC::Sender {
shared_memory->requested_size(), 0)));
}
- void NotifyDataReceived(int request_id, std::string data) {
+ void NotifyDataReceived(int request_id, const std::string& data) {
ASSERT_LE(data.length(), shared_memory_map_[request_id]->requested_size());
memcpy(shared_memory_map_[request_id]->memory(), data.c_str(),
data.length());