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

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

Issue 6965018: Install CRX updates one at a time. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Polish Created 9 years, 7 months 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
Index: chrome/browser/extensions/extension_service.cc
diff --git a/chrome/browser/extensions/extension_service.cc b/chrome/browser/extensions/extension_service.cc
index a409420dfbb39c47d0085be060892b98f24856c5..c2fe95e5cfd11b61f2860b8a8c27f29d856285d4 100644
--- a/chrome/browser/extensions/extension_service.cc
+++ b/chrome/browser/extensions/extension_service.cc
@@ -600,9 +600,11 @@ void ExtensionService::Init() {
GarbageCollectExtensions();
}
-void ExtensionService::UpdateExtension(const std::string& id,
- const FilePath& extension_path,
- const GURL& download_url) {
+bool ExtensionService::UpdateExtension(
+ const std::string& id,
+ const FilePath& extension_path,
+ const GURL& download_url,
+ CrxInstaller** out_crx_installer) {
CHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
PendingExtensionInfo pending_extension_info;
@@ -621,7 +623,8 @@ void ExtensionService::UpdateExtension(const std::string& id,
NewRunnableFunction(
extension_file_util::DeleteFile, extension_path, false)))
NOTREACHED();
- return;
+
+ return false;
}
// We want a silent install only for non-pending extensions and
@@ -640,6 +643,11 @@ void ExtensionService::UpdateExtension(const std::string& id,
installer->set_original_url(download_url);
installer->set_install_cause(extension_misc::INSTALL_CAUSE_UPDATE);
installer->InstallCrx(extension_path);
+
+ if (out_crx_installer)
+ *out_crx_installer = installer;
+
+ return true;
}
void ExtensionService::ReloadExtension(const std::string& extension_id) {
« no previous file with comments | « chrome/browser/extensions/extension_service.h ('k') | chrome/browser/extensions/extension_service_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698