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

Unified Diff: ipc/ipc_sync_message_unittest.cc

Issue 1349783006: Cleanup: Pass std::string as const reference if possible (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Revert third_party changes 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: ipc/ipc_sync_message_unittest.cc
diff --git a/ipc/ipc_sync_message_unittest.cc b/ipc/ipc_sync_message_unittest.cc
index 2e3e3240418ae433cd64a477ff35534107489d22..c8edb0c50d973520338bc67f29b4eb42ca6521aa 100644
--- a/ipc/ipc_sync_message_unittest.cc
+++ b/ipc/ipc_sync_message_unittest.cc
@@ -75,14 +75,18 @@ class TestMessageReceiver {
*out3 = false;
}
- void On_3_1(int in1, bool in2, std::string in3, bool* out1) {
+ void On_3_1(int in1, bool in2, const std::string& in3, bool* out1) {
DCHECK_EQ(1, in1);
DCHECK(!in2);
DCHECK_EQ("3_1", in3);
*out1 = true;
}
- void On_3_2(std::string in1, bool in2, int in3, bool* out1, int* out2) {
+ void On_3_2(const std::string& in1,
+ bool in2,
+ int in3,
+ bool* out1,
+ int* out2) {
DCHECK_EQ("3_2", in1);
DCHECK(!in2);
DCHECK_EQ(2, in3);
@@ -90,7 +94,11 @@ class TestMessageReceiver {
*out2 = 32;
}
- void On_3_3(int in1, std::string in2, bool in3, std::string* out1, int* out2,
+ void On_3_3(int in1,
+ const std::string& in2,
+ bool in3,
+ std::string* out1,
+ int* out2,
bool* out3) {
DCHECK_EQ(3, in1);
DCHECK_EQ("3_3", in2);
@@ -100,8 +108,13 @@ class TestMessageReceiver {
*out3 = false;
}
- void On_3_4(bool in1, int in2, std::string in3, int* out1, bool* out2,
- std::string* out3, bool* out4) {
+ void On_3_4(bool in1,
+ int in2,
+ const std::string& in3,
+ int* out1,
+ bool* out2,
+ std::string* out3,
+ bool* out4) {
DCHECK(in1);
DCHECK_EQ(3, in2);
DCHECK_EQ("3_4", in3);

Powered by Google App Engine
This is Rietveld 408576698