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

Unified Diff: extensions/common/manifest.cc

Issue 1274123003: Update SplitString calls to new form (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: no media changes 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 f072488b7e16bd28cfa6142ea140462a4db4c3bf..c552de7136a10c044e1ebbe29be7f3dba7cae073 100644
--- a/extensions/common/manifest.cc
+++ b/extensions/common/manifest.cc
@@ -240,11 +240,10 @@ int Manifest::GetManifestVersion() const {
}
bool Manifest::CanAccessPath(const std::string& path) const {
- std::vector<std::string> components;
- base::SplitString(path, '.', &components);
std::string key;
- for (size_t i = 0; i < components.size(); ++i) {
- key += components[i];
+ for (const base::StringPiece& component : base::SplitStringPiece(
+ path, ".", base::TRIM_WHITESPACE, base::SPLIT_WANT_ALL)) {
+ component.AppendToString(&key);
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