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

Unified Diff: chrome/browser/extensions/crx_installer.h

Issue 8417012: Refactor loading out of ExtensionService. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: finally Created 9 years, 2 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
« no previous file with comments | « chrome/browser/extensions/component_loader.cc ('k') | chrome/browser/extensions/crx_installer.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/extensions/crx_installer.h
diff --git a/chrome/browser/extensions/crx_installer.h b/chrome/browser/extensions/crx_installer.h
index 4e0474eff0a7b92b5ee0068863640b33576ff2e7..d2955ae9b5ae4f494e0a19287dfb9c999fa1b9bd 100644
--- a/chrome/browser/extensions/crx_installer.h
+++ b/chrome/browser/extensions/crx_installer.h
@@ -48,6 +48,13 @@ class CrxInstaller
: public SandboxedExtensionUnpackerClient,
public ExtensionInstallUI::Delegate {
public:
+ // Extensions will be installed into frontend->install_directory(),
+ // then registered with |frontend|. Any install UI will be displayed
+ // using |client|. Pass NULL for |client| for silent install.
+ static scoped_refptr<CrxInstaller> Create(
+ ExtensionService* frontend,
+ ExtensionInstallUI* client);
+
// This is pretty lame, but given the difficulty of connecting a particular
// ExtensionFunction to a resulting download in the download manager, it's
// currently necessary. This is the |id| of an extension to be installed
@@ -92,13 +99,6 @@ class CrxInstaller
// only be called on the UI thread.
static bool ClearWhitelistedInstallId(const std::string& id);
- // Constructor. Extensions will be installed into
- // frontend_weak->install_directory() then registered with
- // |frontend_weak|. Any install UI will be displayed using
- // |client|. Pass NULL for |client| for silent install.
- CrxInstaller(base::WeakPtr<ExtensionService> frontend_weak,
- ExtensionInstallUI* client);
-
// Install the crx in |source_file|.
void InstallCrx(const FilePath& source_file);
@@ -141,8 +141,10 @@ class CrxInstaller
return (creation_flags_ & Extension::FROM_WEBSTORE) > 0;
}
void set_is_gallery_install(bool val) {
- if (val) creation_flags_ |= Extension::FROM_WEBSTORE;
- else creation_flags_ &= ~Extension::FROM_WEBSTORE;
+ if (val)
+ creation_flags_ |= Extension::FROM_WEBSTORE;
+ else
+ creation_flags_ &= ~Extension::FROM_WEBSTORE;
}
// The original download URL should be set when the WebstoreInstaller is
@@ -181,6 +183,8 @@ class CrxInstaller
private:
friend class ExtensionUpdaterTest;
+ CrxInstaller(base::WeakPtr<ExtensionService> frontend_weak,
+ ExtensionInstallUI* client);
virtual ~CrxInstaller();
// Converts the source user script to an extension.
« no previous file with comments | « chrome/browser/extensions/component_loader.cc ('k') | chrome/browser/extensions/crx_installer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698