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

Unified Diff: sync/util/cryptographer.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: sync/util/cryptographer.cc
diff --git a/sync/util/cryptographer.cc b/sync/util/cryptographer.cc
index 41914656e48d2141b305333e10bcae13488400d1..0fe0b25a3c8922329eede2daa12bf0b1368a795c 100644
--- a/sync/util/cryptographer.cc
+++ b/sync/util/cryptographer.cc
@@ -187,7 +187,7 @@ bool Cryptographer::AddNonDefaultKey(const KeyParams& params) {
}
bool Cryptographer::AddKeyFromBootstrapToken(
- const std::string restored_bootstrap_token) {
+ const std::string& restored_bootstrap_token) {
// Create the new Nigori and make it the default encryptor.
std::string serialized_nigori_key = UnpackBootstrapToken(
restored_bootstrap_token);
@@ -361,7 +361,7 @@ std::string Cryptographer::GetDefaultNigoriKeyData() const {
return key.SerializeAsString();
}
-bool Cryptographer::ImportNigoriKey(const std::string serialized_nigori_key) {
+bool Cryptographer::ImportNigoriKey(const std::string& serialized_nigori_key) {
if (serialized_nigori_key.empty())
return false;
« no previous file with comments | « sync/util/cryptographer.h ('k') | testing/multiprocess_func_list.h » ('j') | url/gurl.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698