diff options
author | maruel@chromium.org <maruel@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-03-05 12:46:38 +0000 |
---|---|---|
committer | maruel@chromium.org <maruel@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-03-05 12:46:38 +0000 |
commit | f0a51fb571f46531025fa09240bbc3e1af925e84 (patch) | |
tree | 558b4f0e737fda4b9ab60f252c9c23b8a4ca523e /chrome/browser/extensions | |
parent | 6390be368205705f49ead3cec40396519f13b889 (diff) | |
download | chromium_src-f0a51fb571f46531025fa09240bbc3e1af925e84.zip chromium_src-f0a51fb571f46531025fa09240bbc3e1af925e84.tar.gz chromium_src-f0a51fb571f46531025fa09240bbc3e1af925e84.tar.bz2 |
Fixes CRLF and trailing white spaces.
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@10982 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/extensions')
-rw-r--r-- | chrome/browser/extensions/extensions_service.cc | 14 | ||||
-rw-r--r-- | chrome/browser/extensions/extensions_service.h | 2 | ||||
-rw-r--r-- | chrome/browser/extensions/user_script_master.cc | 2 |
3 files changed, 9 insertions, 9 deletions
diff --git a/chrome/browser/extensions/extensions_service.cc b/chrome/browser/extensions/extensions_service.cc index 5611594..32492cc 100644 --- a/chrome/browser/extensions/extensions_service.cc +++ b/chrome/browser/extensions/extensions_service.cc @@ -371,7 +371,7 @@ DictionaryValue* ExtensionsServiceBackend::ReadManifest( } if (header.header_size > sizeof(ExtensionHeader)) fseek(file.get(), header.header_size - sizeof(ExtensionHeader), SEEK_CUR); - + char buf[1 << 16]; std::string manifest_str; size_t read_size = std::min(sizeof(buf), header.manifest_size); @@ -495,7 +495,7 @@ bool ExtensionsServiceBackend::CheckCurrentVersion( // has actually loaded successfully. FilePath version_dir = dest_dir.AppendASCII(current_version_str); if (file_util::PathExists(version_dir)) { - ReportExtensionInstallError(dest_dir, + ReportExtensionInstallError(dest_dir, "Existing version is already up to date."); return false; } @@ -503,7 +503,7 @@ bool ExtensionsServiceBackend::CheckCurrentVersion( return true; } -bool ExtensionsServiceBackend::InstallDirSafely(const FilePath& source_dir, +bool ExtensionsServiceBackend::InstallDirSafely(const FilePath& source_dir, const FilePath& dest_dir) { if (file_util::PathExists(dest_dir)) { @@ -564,13 +564,13 @@ bool ExtensionsServiceBackend::SetCurrentVersion(const FilePath& dest_dir, // Restore the old CurrentVersion. if (file_util::PathExists(current_version_old)) { if (!file_util::Move(current_version_old, current_version)) { - LOG(WARNING) << "couldn't restore " << current_version_old.value() << + LOG(WARNING) << "couldn't restore " << current_version_old.value() << " to " << current_version.value(); // TODO(erikkay): This is an ugly state to be in. Try harder? } } - ReportExtensionInstallError(dest_dir, + ReportExtensionInstallError(dest_dir, "Couldn't create CurrentVersion file."); return false; } @@ -616,7 +616,7 @@ bool ExtensionsServiceBackend::InstallOrUpdateExtension( // If an expected id was provided, make sure it matches. if (expected_id.length() && expected_id != extension.id()) { - ReportExtensionInstallError(source_file, + ReportExtensionInstallError(source_file, "ID in new extension manifest does not match expected ID."); return false; } @@ -646,7 +646,7 @@ bool ExtensionsServiceBackend::InstallOrUpdateExtension( ScopedTempDir scoped_temp; scoped_temp.Set(temp_dir); if (!scoped_temp.IsValid()) { - ReportExtensionInstallError(source_file, + ReportExtensionInstallError(source_file, "Couldn't create temporary directory."); return false; } diff --git a/chrome/browser/extensions/extensions_service.h b/chrome/browser/extensions/extensions_service.h index be3158c..56e0afa 100644 --- a/chrome/browser/extensions/extensions_service.h +++ b/chrome/browser/extensions/extensions_service.h @@ -137,7 +137,7 @@ class ExtensionsServiceBackend scoped_refptr<ExtensionsServiceFrontendInterface> frontend); // Check externally updated extensions for updates and install if necessary. - // Errors are reported through ExtensionErrorReporter. + // Errors are reported through ExtensionErrorReporter. // ReportExtensionInstalled is called on success. void CheckForExternalUpdates( scoped_refptr<ExtensionsServiceFrontendInterface> frontend); diff --git a/chrome/browser/extensions/user_script_master.cc b/chrome/browser/extensions/user_script_master.cc index c37e1bb..c6ac773 100644 --- a/chrome/browser/extensions/user_script_master.cc +++ b/chrome/browser/extensions/user_script_master.cc @@ -155,7 +155,7 @@ base::SharedMemory* UserScriptMaster::ScriptReloader::GetNewScripts( file = enumerator.Next()) { all_scripts.push_back(UserScript()); UserScript& info = all_scripts.back(); - info.set_url(GURL(std::string(chrome::kUserScriptScheme) + ":/" + + info.set_url(GURL(std::string(chrome::kUserScriptScheme) + ":/" + net::FilePathToFileURL(file.ToWStringHack()).ExtractFileName())); info.set_path(file); } |