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 += '.'; |