From 30ace79421e9cda0463cf2b7dc5a2ea62827528a Mon Sep 17 00:00:00 2001 From: "dbeam@chromium.org" Date: Thu, 22 Dec 2011 00:44:53 +0000 Subject: [Coverity] Change some pass by values to pass by const refs. CID=8501 CID=100223 R=dhollowa@chromium.org Review URL: http://codereview.chromium.org/9006038 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@115456 0039d316-1c4b-4281-b951-d872f2087c98 --- chrome/browser/webdata/autofill_change.cc | 4 ++-- chrome/browser/webdata/autofill_change.h | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) (limited to 'chrome/browser/webdata') diff --git a/chrome/browser/webdata/autofill_change.cc b/chrome/browser/webdata/autofill_change.cc index 454d7b9..e6bb085 100644 --- a/chrome/browser/webdata/autofill_change.cc +++ b/chrome/browser/webdata/autofill_change.cc @@ -15,7 +15,7 @@ AutofillChange::~AutofillChange() { } AutofillProfileChange::AutofillProfileChange( - Type type, std::string key, const AutofillProfile* profile) + Type type, const std::string& key, const AutofillProfile* profile) : GenericAutofillChange(type, key), profile_(profile) { DCHECK(type == ADD ? (profile && profile->guid() == key) : true); @@ -34,7 +34,7 @@ bool AutofillProfileChange::operator==( } AutofillCreditCardChange::AutofillCreditCardChange( - Type type, std::string key, const CreditCard* credit_card) + Type type, const std::string& key, const CreditCard* credit_card) : GenericAutofillChange(type, key), credit_card_(credit_card) { DCHECK(type == ADD ? (credit_card && credit_card->guid() == key) : true); DCHECK(type == UPDATE ? (credit_card && credit_card->guid() == key) : true); diff --git a/chrome/browser/webdata/autofill_change.h b/chrome/browser/webdata/autofill_change.h index 297a6a7..079a94a 100644 --- a/chrome/browser/webdata/autofill_change.h +++ b/chrome/browser/webdata/autofill_change.h @@ -54,7 +54,7 @@ class AutofillProfileChange : public GenericAutofillChange { // When |type| == UPDATE, |profile| should be non-NULL. // When |type| == REMOVE, |profile| should be NULL. AutofillProfileChange(Type type, - std::string key, + const std::string& key, const AutofillProfile* profile); virtual ~AutofillProfileChange(); @@ -75,7 +75,7 @@ class AutofillCreditCardChange : public GenericAutofillChange { // When |type| == UPDATE, |credit_card| should be non-NULL. // When |type| == REMOVE, |credit_card| should be NULL. AutofillCreditCardChange(Type type, - std::string key, + const std::string& key, const CreditCard* credit_card); virtual ~AutofillCreditCardChange(); -- cgit v1.1