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

Unified Diff: chrome/browser/sync/test/integration/performance/autofill_sync_perf_test.cc

Issue 1113493004: Cleanup return values in autofill_sync (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 8 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/sync/test/integration/performance/autofill_sync_perf_test.cc
diff --git a/chrome/browser/sync/test/integration/performance/autofill_sync_perf_test.cc b/chrome/browser/sync/test/integration/performance/autofill_sync_perf_test.cc
index 5a74e7d876c15507cd875dc14a7dcf25ba2c5024..ae64606dcc7d58e6bd1c5cdfc4823cfdc5cd6e1f 100644
--- a/chrome/browser/sync/test/integration/performance/autofill_sync_perf_test.cc
+++ b/chrome/browser/sync/test/integration/performance/autofill_sync_perf_test.cc
@@ -55,28 +55,28 @@ class AutofillSyncPerfTest : public SyncTest {
private:
// Returns a new unique autofill profile.
- const AutofillProfile NextAutofillProfile();
+ const AutofillProfile& NextAutofillProfile();
// Returns a new unique autofill key.
- const AutofillKey NextAutofillKey();
+ const AutofillKey& NextAutofillKey();
// Returns an unused unique guid.
- const std::string NextGUID();
+ const std::string& NextGUID();
// Returns a unique guid based on the input integer |n|.
- const std::string IntToGUID(int n);
+ const std::string& IntToGUID(int n);
// Returns a new unused unique name.
- const std::string NextName();
+ const std::string& NextName();
// Returns a unique name based on the input integer |n|.
- const std::string IntToName(int n);
+ const std::string& IntToName(int n);
// Returns a new unused unique value for autofill entries.
- const std::string NextValue();
+ const std::string& NextValue();
// Returnes a unique value based on the input integer |n|.
- const std::string IntToValue(int n);
+ const std::string& IntToValue(int n);
int guid_number_;
int name_number_;
@@ -122,7 +122,7 @@ void AutofillSyncPerfTest::AddKeys(int profile, int num_keys) {
autofill_helper::AddKeys(profile, keys);
}
-const AutofillProfile AutofillSyncPerfTest::NextAutofillProfile() {
+const AutofillProfile& AutofillSyncPerfTest::NextAutofillProfile() {
AutofillProfile profile;
autofill::test::SetProfileInfoWithGuid(&profile, NextGUID().c_str(),
NextName().c_str(), "", "", "", "", "",
@@ -130,31 +130,31 @@ const AutofillProfile AutofillSyncPerfTest::NextAutofillProfile() {
return profile;
}
-const AutofillKey AutofillSyncPerfTest::NextAutofillKey() {
+const AutofillKey& AutofillSyncPerfTest::NextAutofillKey() {
return AutofillKey(NextName().c_str(), NextName().c_str());
}
-const std::string AutofillSyncPerfTest::NextGUID() {
+const std::string& AutofillSyncPerfTest::NextGUID() {
return IntToGUID(guid_number_++);
}
-const std::string AutofillSyncPerfTest::IntToGUID(int n) {
+const std::string& AutofillSyncPerfTest::IntToGUID(int n) {
return base::StringPrintf("00000000-0000-0000-0000-%012X", n);
}
-const std::string AutofillSyncPerfTest::NextName() {
+const std::string& AutofillSyncPerfTest::NextName() {
return IntToName(name_number_++);
}
-const std::string AutofillSyncPerfTest::IntToName(int n) {
+const std::string& AutofillSyncPerfTest::IntToName(int n) {
return base::StringPrintf("Name%d", n);
}
-const std::string AutofillSyncPerfTest::NextValue() {
+const std::string& AutofillSyncPerfTest::NextValue() {
return IntToValue(value_number_++);
}
-const std::string AutofillSyncPerfTest::IntToValue(int n) {
+const std::string& AutofillSyncPerfTest::IntToValue(int n) {
return base::StringPrintf("Value%d", n);
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698