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

Unified Diff: components/data_reduction_proxy/core/common/data_reduction_proxy_event_store.cc

Issue 2695883003: Change uses of base::JoinString to pass StringPieces where possible. (Closed)
Patch Set: Remove dependency CL. Created 3 years, 9 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: components/data_reduction_proxy/core/common/data_reduction_proxy_event_store.cc
diff --git a/components/data_reduction_proxy/core/common/data_reduction_proxy_event_store.cc b/components/data_reduction_proxy/core/common/data_reduction_proxy_event_store.cc
index 8f7db517adb5fc1d1c4040a30ef041bcb43012d4..5283b4523860a6d0d2ba55e23a2431abcfa5557d 100644
--- a/components/data_reduction_proxy/core/common/data_reduction_proxy_event_store.cc
+++ b/components/data_reduction_proxy/core/common/data_reduction_proxy_event_store.cc
@@ -12,6 +12,7 @@
#include "base/memory/ptr_util.h"
#include "base/stl_util.h"
#include "base/strings/string_number_conversions.h"
+#include "base/strings/string_piece.h"
#include "base/strings/string_util.h"
#include "base/time/time.h"
#include "base/values.h"
@@ -51,13 +52,13 @@ const StringToConstant kDataReductionProxyBypassActionTypeTable[] = {
};
std::string JoinListValueStrings(base::ListValue* list_value) {
- std::vector<std::string> values;
+ std::vector<base::StringPiece> values;
for (const auto& value : *list_value) {
- std::string value_string;
+ base::StringPiece value_string;
if (!value->GetAsString(&value_string))
return std::string();
- values.push_back(std::move(value_string));
+ values.push_back(value_string);
}
return base::JoinString(values, ";");
« no previous file with comments | « components/autofill/core/browser/webdata/autofill_wallet_syncable_service.cc ('k') | components/flags_ui/flags_state.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698