summaryrefslogtreecommitdiffstats
path: root/chrome/browser/extensions/extension_service.cc
diff options
context:
space:
mode:
authorskerner@chromium.org <skerner@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-03-03 17:08:05 +0000
committerskerner@chromium.org <skerner@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-03-03 17:08:05 +0000
commit53da2c966e807aa158324d34beb4eb7ef78f4b55 (patch)
tree3e6f8ed57f091bb2fd426dbf60b50d74fcb9a03e /chrome/browser/extensions/extension_service.cc
parenta834bf1848370a4303aede1120e69973cb1f1eef (diff)
downloadchromium_src-53da2c966e807aa158324d34beb4eb7ef78f4b55.zip
chromium_src-53da2c966e807aa158324d34beb4eb7ef78f4b55.tar.gz
chromium_src-53da2c966e807aa158324d34beb4eb7ef78f4b55.tar.bz2
Fix TODOs: Get rid of ExtensionService::InstallExtension().
Also use a single delete function when removing extension files. BUG=None TEST=ExtensionServiceTest.* Review URL: http://codereview.chromium.org/6596041 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@76752 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/extensions/extension_service.cc')
-rw-r--r--chrome/browser/extensions/extension_service.cc21
1 files changed, 3 insertions, 18 deletions
diff --git a/chrome/browser/extensions/extension_service.cc b/chrome/browser/extensions/extension_service.cc
index e2572b2..e15fa03 100644
--- a/chrome/browser/extensions/extension_service.cc
+++ b/chrome/browser/extensions/extension_service.cc
@@ -508,22 +508,6 @@ void ExtensionService::Init() {
GarbageCollectExtensions();
}
-void ExtensionService::InstallExtension(const FilePath& extension_path) {
- scoped_refptr<CrxInstaller> installer(
- new CrxInstaller(this, // frontend
- NULL)); // no client (silent install)
- installer->InstallCrx(extension_path);
-}
-
-namespace {
- // TODO(akalin): Put this somewhere where both crx_installer.cc and
- // this file can use it.
- void DeleteFileHelper(const FilePath& path, bool recursive) {
- CHECK(BrowserThread::CurrentlyOn(BrowserThread::FILE));
- file_util::Delete(path, recursive);
- }
-} // namespace
-
void ExtensionService::UpdateExtension(const std::string& id,
const FilePath& extension_path,
const GURL& download_url) {
@@ -540,7 +524,8 @@ void ExtensionService::UpdateExtension(const std::string& id,
// that would do it for us.
BrowserThread::PostTask(
BrowserThread::FILE, FROM_HERE,
- NewRunnableFunction(&DeleteFileHelper, extension_path, false));
+ NewRunnableFunction(
+ extension_file_util::DeleteFile, extension_path, false));
return;
}
@@ -1560,7 +1545,7 @@ void ExtensionService::OnExtensionInstalled(const Extension* extension) {
// load it.
BrowserThread::PostTask(
BrowserThread::FILE, FROM_HERE,
- NewRunnableFunction(&DeleteFileHelper, extension->path(), true));
+ NewRunnableFunction(&extension_file_util::DeleteFile, extension->path(), true));
return;
}