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

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

Issue 2751013002: Simplify ExtensionInstallChecker into a single-use class (Closed)
Patch Set: todo Created 3 years, 9 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/unpacked_installer.h
diff --git a/chrome/browser/extensions/unpacked_installer.h b/chrome/browser/extensions/unpacked_installer.h
index c0416a20bdfaf4d064afbfc91cdb926ca3e98aed..e145befc654438bd87030b18a48489001240658e 100644
--- a/chrome/browser/extensions/unpacked_installer.h
+++ b/chrome/browser/extensions/unpacked_installer.h
@@ -14,13 +14,14 @@
#include "base/macros.h"
#include "base/memory/ref_counted.h"
#include "base/memory/weak_ptr.h"
-#include "chrome/browser/extensions/extension_install_checker.h"
class ExtensionService;
+class Profile;
namespace extensions {
class Extension;
+class ExtensionInstallChecker;
// Installs and loads an unpacked extension. Because internal state needs to be
// held about the instalation process, only one call to Load*() should be made
@@ -117,15 +118,21 @@ class UnpackedInstaller
// Helper to get the Extension::CreateFlags for the installing extension.
int GetFlags();
- const Extension* extension() { return install_checker_.extension().get(); }
+ const Extension* extension() { return extension_.get(); }
// The service we will report results back to.
base::WeakPtr<ExtensionService> service_weak_;
+ // The Profile the extension is being installed in.
+ Profile* profile_;
+
// The pathname of the directory to load from, which is an absolute path
// after GetAbsolutePath has been called.
base::FilePath extension_path_;
+ // The extension being installed.
+ scoped_refptr<const Extension> extension_;
+
// If true and the extension contains plugins, we prompt the user before
// loading.
bool prompt_for_plugins_;
@@ -139,7 +146,7 @@ class UnpackedInstaller
// Checks management policies and requirements before the extension can be
// installed.
- ExtensionInstallChecker install_checker_;
+ std::unique_ptr<ExtensionInstallChecker> install_checker_;
CompletionCallback callback_;
« no previous file with comments | « chrome/browser/extensions/extension_install_checker_unittest.cc ('k') | chrome/browser/extensions/unpacked_installer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698