diff options
-rw-r--r-- | chrome/browser/extensions/extensions_service.cc | 8 | ||||
-rw-r--r-- | chrome/browser/extensions/extensions_service.h | 7 |
2 files changed, 8 insertions, 7 deletions
diff --git a/chrome/browser/extensions/extensions_service.cc b/chrome/browser/extensions/extensions_service.cc index 9872c72..486926d 100644 --- a/chrome/browser/extensions/extensions_service.cc +++ b/chrome/browser/extensions/extensions_service.cc @@ -694,8 +694,8 @@ void ExtensionsServiceBackend::LoadInstalledExtension( ReportExtensionsLoaded(extensions); } -DictionaryValue* ExtensionsServiceBackend::ReadManifest(FilePath manifest_path, - std::string* error) { +DictionaryValue* ExtensionsServiceBackend::ReadManifest( + const FilePath& manifest_path, std::string* error) { JSONFileValueSerializer serializer(manifest_path); scoped_ptr<Value> root(serializer.Deserialize(error)); if (!root.get()) @@ -915,7 +915,7 @@ bool ExtensionsServiceBackend::InstallDirSafely(const FilePath& source_dir, } bool ExtensionsServiceBackend::SetCurrentVersion(const FilePath& dest_dir, - std::string version) { + const std::string& version) { // Write out the new CurrentVersion file. // <profile>/Extension/<name>/CurrentVersion FilePath current_version = @@ -1084,7 +1084,7 @@ bool ExtensionsServiceBackend::ValidateSignature(const FilePath& extension_path, void ExtensionsServiceBackend::OnExtensionUnpacked( const FilePath& extension_path, const FilePath& temp_extension_dir, - const std::string expected_id, + const std::string& expected_id, const DictionaryValue& manifest, const std::vector< Tuple2<SkBitmap, FilePath> >& images, bool silent, bool from_gallery) { diff --git a/chrome/browser/extensions/extensions_service.h b/chrome/browser/extensions/extensions_service.h index 0a36cc8..f7fad70 100644 --- a/chrome/browser/extensions/extensions_service.h +++ b/chrome/browser/extensions/extensions_service.h @@ -347,7 +347,8 @@ class ExtensionsServiceBackend // Utility function to read an extension manifest and return it as a // DictionaryValue. If it fails, NULL is returned and |error| contains an // appropriate message. - DictionaryValue* ReadManifest(FilePath manifest_path, std::string* error); + DictionaryValue* ReadManifest(const FilePath& manifest_path, + std::string* error); // Load a single extension from |extension_path|, the top directory of // a specific extension where its manifest file lives. @@ -381,7 +382,7 @@ class ExtensionsServiceBackend void OnExtensionUnpacked( const FilePath& extension_path, const FilePath& temp_extension_dir, - const std::string expected_id, + const std::string& expected_id, const DictionaryValue& manifest, const std::vector< Tuple2<SkBitmap, FilePath> >& images, bool silent, @@ -446,7 +447,7 @@ class ExtensionsServiceBackend // Update the CurrentVersion file in |dest_dir| to |version|. bool SetCurrentVersion(const FilePath& dest_dir, - std::string version); + const std::string& version); // For the extension in |version_path| with |id|, check to see if it's an // externally managed extension. If so return true if it should be |