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

Unified Diff: chrome/browser/extensions/extensions_service.cc

Issue 13315: Move file enumeration to filepaths. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 12 years 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 | « base/file_util_win.cc ('k') | chrome/browser/greasemonkey_master.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/extensions/extensions_service.cc
===================================================================
--- chrome/browser/extensions/extensions_service.cc (revision 6739)
+++ chrome/browser/extensions/extensions_service.cc (working copy)
@@ -71,15 +71,14 @@
// Find all child directories in the install directory and load their
// manifests. Post errors and results to the frontend.
scoped_ptr<ExtensionList> extensions(new ExtensionList);
- file_util::FileEnumerator enumerator(path.ToWStringHack(),
+ file_util::FileEnumerator enumerator(path,
false, // not recursive
file_util::FileEnumerator::DIRECTORIES);
- for (std::wstring child_path = enumerator.Next(); !child_path.empty();
+ for (FilePath child_path = enumerator.Next(); !child_path.value().empty();
child_path = enumerator.Next()) {
- FilePath manifest_path = FilePath::FromWStringHack(child_path).Append(
- Extension::kManifestFilename);
+ FilePath manifest_path = child_path.Append(Extension::kManifestFilename);
if (!file_util::PathExists(manifest_path)) {
- ReportExtensionLoadError(frontend.get(), child_path,
+ ReportExtensionLoadError(frontend.get(), child_path.ToWStringHack(),
Extension::kInvalidManifestError);
continue;
}
@@ -88,13 +87,14 @@
Value* root = NULL;
std::string error;
if (!serializer.Deserialize(&root, &error)) {
- ReportExtensionLoadError(frontend.get(), child_path, error);
+ ReportExtensionLoadError(frontend.get(), child_path.ToWStringHack(),
+ error);
continue;
}
scoped_ptr<Value> scoped_root(root);
if (!root->IsType(Value::TYPE_DICTIONARY)) {
- ReportExtensionLoadError(frontend.get(), child_path,
+ ReportExtensionLoadError(frontend.get(), child_path.ToWStringHack(),
Extension::kInvalidManifestError);
continue;
}
@@ -102,7 +102,8 @@
scoped_ptr<Extension> extension(new Extension());
if (!extension->InitFromValue(*static_cast<DictionaryValue*>(root),
&error)) {
- ReportExtensionLoadError(frontend.get(), child_path, error);
+ ReportExtensionLoadError(frontend.get(), child_path.ToWStringHack(),
+ error);
continue;
}
« no previous file with comments | « base/file_util_win.cc ('k') | chrome/browser/greasemonkey_master.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698