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

Unified Diff: extensions/common/manifest.cc

Issue 1278973003: Revert of Update SplitString calls to new form (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 4 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: extensions/common/manifest.cc
diff --git a/extensions/common/manifest.cc b/extensions/common/manifest.cc
index c552de7136a10c044e1ebbe29be7f3dba7cae073..f072488b7e16bd28cfa6142ea140462a4db4c3bf 100644
--- a/extensions/common/manifest.cc
+++ b/extensions/common/manifest.cc
@@ -240,10 +240,11 @@
}
bool Manifest::CanAccessPath(const std::string& path) const {
+ std::vector<std::string> components;
+ base::SplitString(path, '.', &components);
std::string key;
- for (const base::StringPiece& component : base::SplitStringPiece(
- path, ".", base::TRIM_WHITESPACE, base::SPLIT_WANT_ALL)) {
- component.AppendToString(&key);
+ for (size_t i = 0; i < components.size(); ++i) {
+ key += components[i];
if (!CanAccessKey(key))
return false;
key += '.';
« no previous file with comments | « extensions/common/features/base_feature_provider.cc ('k') | extensions/common/permissions/socket_permission_data.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698