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

Unified Diff: chrome/browser/chromeos/power/peripheral_battery_observer.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: chrome/browser/chromeos/power/peripheral_battery_observer.cc
diff --git a/chrome/browser/chromeos/power/peripheral_battery_observer.cc b/chrome/browser/chromeos/power/peripheral_battery_observer.cc
index 89abfa46264f4f2463229cb8e5e4f53a8061274b..6a254f63a209b132787e7c08d366fdc7c5b6e1de 100644
--- a/chrome/browser/chromeos/power/peripheral_battery_observer.cc
+++ b/chrome/browser/chromeos/power/peripheral_battery_observer.cc
@@ -11,6 +11,7 @@
#include "base/bind.h"
#include "base/macros.h"
#include "base/strings/string16.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"
@@ -64,7 +65,7 @@ std::string ExtractBluetoothAddress(const std::string& path) {
return std::string();
std::string reverse_address =
base::ToLowerASCII(path.substr(header_size, key_len));
- std::vector<std::string> result = base::SplitString(
+ std::vector<base::StringPiece> result = base::SplitStringPiece(
reverse_address, ":", base::TRIM_WHITESPACE, base::SPLIT_WANT_ALL);
std::reverse(result.begin(), result.end());
std::string address = base::JoinString(result, ":");

Powered by Google App Engine
This is Rietveld 408576698