| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "chrome/common/extensions/extension_file_util.h" | 5 #include "chrome/common/extensions/extension_file_util.h" |
| 6 | 6 |
| 7 #include <map> | 7 #include <map> |
| 8 #include <vector> | 8 #include <vector> |
| 9 | 9 |
| 10 #include "base/file_util.h" | 10 #include "base/file_util.h" |
| (...skipping 111 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 122 | 122 |
| 123 scoped_refptr<Extension> LoadExtension(const FilePath& extension_path, | 123 scoped_refptr<Extension> LoadExtension(const FilePath& extension_path, |
| 124 Extension::Location location, | 124 Extension::Location location, |
| 125 int flags, | 125 int flags, |
| 126 std::string* error) { | 126 std::string* error) { |
| 127 return LoadExtension( | 127 return LoadExtension( |
| 128 extension_path, std::string(), location, flags, error); | 128 extension_path, std::string(), location, flags, error); |
| 129 } | 129 } |
| 130 | 130 |
| 131 scoped_refptr<Extension> LoadExtension(const FilePath& extension_path, | 131 scoped_refptr<Extension> LoadExtension(const FilePath& extension_path, |
| 132 std::string extension_id, | 132 const std::string& extension_id, |
| 133 Extension::Location location, | 133 Extension::Location location, |
| 134 int flags, | 134 int flags, |
| 135 std::string* error) { | 135 std::string* error) { |
| 136 scoped_ptr<DictionaryValue> manifest(LoadManifest(extension_path, error)); | 136 scoped_ptr<DictionaryValue> manifest(LoadManifest(extension_path, error)); |
| 137 if (!manifest.get()) | 137 if (!manifest.get()) |
| 138 return NULL; | 138 return NULL; |
| 139 if (!extension_l10n_util::LocalizeExtension(extension_path, manifest.get(), | 139 if (!extension_l10n_util::LocalizeExtension(extension_path, manifest.get(), |
| 140 error)) | 140 error)) |
| 141 return NULL; | 141 return NULL; |
| 142 | 142 |
| (...skipping 544 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 687 return temp_path; | 687 return temp_path; |
| 688 | 688 |
| 689 return FilePath(); | 689 return FilePath(); |
| 690 } | 690 } |
| 691 | 691 |
| 692 void DeleteFile(const FilePath& path, bool recursive) { | 692 void DeleteFile(const FilePath& path, bool recursive) { |
| 693 file_util::Delete(path, recursive); | 693 file_util::Delete(path, recursive); |
| 694 } | 694 } |
| 695 | 695 |
| 696 } // namespace extension_file_util | 696 } // namespace extension_file_util |
| OLD | NEW |