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

Unified Diff: components/autofill/core/browser/autofill_manager.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/autofill/core/browser/autofill_manager.cc
diff --git a/components/autofill/core/browser/autofill_manager.cc b/components/autofill/core/browser/autofill_manager.cc
index b13144267eba9f4eb0b2b5d39b280df0a5604bd8..8f0e07c5d7fd27ee66b753885a8a9910432baa51 100644
--- a/components/autofill/core/browser/autofill_manager.cc
+++ b/components/autofill/core/browser/autofill_manager.cc
@@ -26,6 +26,7 @@
#include "base/path_service.h"
#include "base/strings/string16.h"
#include "base/strings/string_number_conversions.h"
+#include "base/strings/string_piece.h"
#include "base/strings/string_split.h"
#include "base/strings/string_util.h"
#include "base/strings/utf_string_conversions.h"
@@ -130,9 +131,9 @@ base::string16 SanitizeCreditCardFieldValue(const base::string16& value) {
// want the logic of which variations of names are considered to be the same to
// exactly match the logic applied on the Payments server.
base::string16 RemoveMiddleInitial(const base::string16& name) {
- std::vector<base::string16> parts =
- base::SplitString(name, base::kWhitespaceUTF16, base::KEEP_WHITESPACE,
- base::SPLIT_WANT_NONEMPTY);
+ std::vector<base::StringPiece16> parts =
+ base::SplitStringPiece(name, base::kWhitespaceUTF16,
+ base::KEEP_WHITESPACE, base::SPLIT_WANT_NONEMPTY);
if (parts.size() == 3 && (parts[1].length() == 1 ||
(parts[1].length() == 2 &&
base::EndsWith(parts[1], base::ASCIIToUTF16("."),

Powered by Google App Engine
This is Rietveld 408576698