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

Unified Diff: extensions/common/permissions/socket_permission_entry.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
« no previous file with comments | « extensions/common/features/feature_provider.cc ('k') | extensions/common/url_pattern.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: extensions/common/permissions/socket_permission_entry.cc
diff --git a/extensions/common/permissions/socket_permission_entry.cc b/extensions/common/permissions/socket_permission_entry.cc
index 0bc963ea10354c7bf83e58b2f640930c26c220e3..dbe3254e77a893f29a7567bfb23eecce59ec9410 100644
--- a/extensions/common/permissions/socket_permission_entry.cc
+++ b/extensions/common/permissions/socket_permission_entry.cc
@@ -14,6 +14,7 @@
#include "base/logging.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 "extensions/common/permissions/api_permission.h"
@@ -158,9 +159,9 @@ bool SocketPermissionEntry::ParseHostPattern(
result.pattern_.host = base::ToLowerASCII(result.pattern_.host);
// The first component can optionally be '*' to match all subdomains.
- std::vector<std::string> host_components =
- base::SplitString(result.pattern_.host, std::string(1, kDot),
- base::TRIM_WHITESPACE, base::SPLIT_WANT_ALL);
+ std::vector<base::StringPiece> host_components =
+ base::SplitStringPiece(result.pattern_.host, std::string{kDot},
+ base::TRIM_WHITESPACE, base::SPLIT_WANT_ALL);
DCHECK(!host_components.empty());
if (host_components[0] == kWildcard || host_components[0].empty()) {
« no previous file with comments | « extensions/common/features/feature_provider.cc ('k') | extensions/common/url_pattern.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698