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

Unified Diff: components/policy/core/browser/policy_error_map.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/policy/core/browser/policy_error_map.cc
diff --git a/components/policy/core/browser/policy_error_map.cc b/components/policy/core/browser/policy_error_map.cc
index b5b7d0e11d0f1469583df9dfc42e4090d529e25a..fc178dac8610e0ace2fb091b47f68e05ddd162c1 100644
--- a/components/policy/core/browser/policy_error_map.cc
+++ b/components/policy/core/browser/policy_error_map.cc
@@ -9,6 +9,7 @@
#include "base/macros.h"
#include "base/memory/ptr_util.h"
#include "base/strings/string_number_conversions.h"
+#include "base/strings/string_piece.h"
#include "base/strings/string_util.h"
#include "base/strings/utf_string_conversions.h"
#include "components/strings/grit/components_strings.h"
@@ -191,7 +192,7 @@ void PolicyErrorMap::AddError(const std::string& policy,
base::string16 PolicyErrorMap::GetErrors(const std::string& policy) {
CheckReadyAndConvert();
std::pair<const_iterator, const_iterator> range = map_.equal_range(policy);
- std::vector<base::string16> list;
+ std::vector<base::StringPiece16> list;
for (const_iterator it = range.first; it != range.second; ++it)
list.push_back(it->second);
return base::JoinString(list, base::ASCIIToUTF16("\n"));

Powered by Google App Engine
This is Rietveld 408576698