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

Side by Side Diff: sync/test/fake_server/fake_server_entity.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 unified diff | Download patch
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "sync/test/fake_server/fake_server_entity.h" 5 #include "sync/test/fake_server/fake_server_entity.h"
6 6
7 #include <limits> 7 #include <limits>
8 #include <string> 8 #include <string>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
51 } 51 }
52 52
53 void FakeServerEntity::SetVersion(int64 version) { 53 void FakeServerEntity::SetVersion(int64 version) {
54 version_ = version; 54 version_ = version;
55 } 55 }
56 56
57 const std::string& FakeServerEntity::GetName() const { 57 const std::string& FakeServerEntity::GetName() const {
58 return name_; 58 return name_;
59 } 59 }
60 60
61 void FakeServerEntity::SetName(std::string name) { 61 void FakeServerEntity::SetName(const std::string& name) {
62 name_ = name; 62 name_ = name;
63 } 63 }
64 64
65 void FakeServerEntity::SetSpecifics( 65 void FakeServerEntity::SetSpecifics(
66 const sync_pb::EntitySpecifics& updated_specifics) { 66 const sync_pb::EntitySpecifics& updated_specifics) {
67 specifics_ = updated_specifics; 67 specifics_ = updated_specifics;
68 } 68 }
69 69
70 bool FakeServerEntity::IsDeleted() const { 70 bool FakeServerEntity::IsDeleted() const {
71 return false; 71 return false;
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after
127 sync_entity->set_id_string(id_); 127 sync_entity->set_id_string(id_);
128 sync_entity->set_version(version_); 128 sync_entity->set_version(version_);
129 sync_entity->set_name(name_); 129 sync_entity->set_name(name_);
130 130
131 // Data via accessors 131 // Data via accessors
132 sync_entity->set_deleted(IsDeleted()); 132 sync_entity->set_deleted(IsDeleted());
133 sync_entity->set_folder(IsFolder()); 133 sync_entity->set_folder(IsFolder());
134 } 134 }
135 135
136 } // namespace fake_server 136 } // namespace fake_server
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698