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

Unified Diff: rlz/chromeos/lib/rlz_value_store_chromeos.cc

Issue 1353323003: Cleanup: Pass std::string as const reference from rlz/ (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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
« no previous file with comments | « rlz/chromeos/lib/rlz_value_store_chromeos.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: rlz/chromeos/lib/rlz_value_store_chromeos.cc
diff --git a/rlz/chromeos/lib/rlz_value_store_chromeos.cc b/rlz/chromeos/lib/rlz_value_store_chromeos.cc
index b02ce34c5e121cda8e39e323b292b70c41057871..80d269e28eda27dbecf66dc32346696aa25c8f04 100644
--- a/rlz/chromeos/lib/rlz_value_store_chromeos.cc
+++ b/rlz/chromeos/lib/rlz_value_store_chromeos.cc
@@ -61,7 +61,7 @@ base::FilePath GetRlzStoreLockPath() {
}
// Returns the dictionary key for storing access point-related prefs.
-std::string GetKeyName(std::string key, AccessPoint access_point) {
+std::string GetKeyName(const std::string& key, AccessPoint access_point) {
std::string brand = SupplementaryBranding::GetBrand();
if (brand.empty())
brand = kNoSupplementaryBrand;
@@ -69,7 +69,7 @@ std::string GetKeyName(std::string key, AccessPoint access_point) {
}
// Returns the dictionary key for storing product-related prefs.
-std::string GetKeyName(std::string key, Product product) {
+std::string GetKeyName(const std::string& key, Product product) {
std::string brand = SupplementaryBranding::GetBrand();
if (brand.empty())
brand = kNoSupplementaryBrand;
@@ -242,7 +242,7 @@ void RlzValueStoreChromeOS::WriteStore() {
LOG(ERROR) << "Error writing RLZ store";
}
-bool RlzValueStoreChromeOS::AddValueToList(std::string list_name,
+bool RlzValueStoreChromeOS::AddValueToList(const std::string& list_name,
base::Value* value) {
base::ListValue* list_value = NULL;
if (!rlz_store_->GetList(list_name, &list_value)) {
@@ -253,7 +253,7 @@ bool RlzValueStoreChromeOS::AddValueToList(std::string list_name,
return true;
}
-bool RlzValueStoreChromeOS::RemoveValueFromList(std::string list_name,
+bool RlzValueStoreChromeOS::RemoveValueFromList(const std::string& list_name,
const base::Value& value) {
base::ListValue* list_value = NULL;
if (!rlz_store_->GetList(list_name, &list_value))
« no previous file with comments | « rlz/chromeos/lib/rlz_value_store_chromeos.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698