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

Side by Side Diff: chrome/browser/extensions/unpacked_installer.h

Issue 2740853002: Use PreloadCheckGroup in ExtensionInstallChecker. Make RequirementsChecker a PreloadCheck. (Closed)
Patch Set: 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 unified diff | Download patch
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef CHROME_BROWSER_EXTENSIONS_UNPACKED_INSTALLER_H_ 5 #ifndef CHROME_BROWSER_EXTENSIONS_UNPACKED_INSTALLER_H_
6 #define CHROME_BROWSER_EXTENSIONS_UNPACKED_INSTALLER_H_ 6 #define CHROME_BROWSER_EXTENSIONS_UNPACKED_INSTALLER_H_
7 7
8 #include <memory> 8 #include <memory>
9 #include <string> 9 #include <string>
10 #include <vector> 10 #include <vector>
(...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after
110 110
111 // Notify the frontend that there was an error loading an extension. 111 // Notify the frontend that there was an error loading an extension.
112 void ReportExtensionLoadError(const std::string& error); 112 void ReportExtensionLoadError(const std::string& error);
113 113
114 // Passes the extension onto extension service. 114 // Passes the extension onto extension service.
115 void InstallExtension(); 115 void InstallExtension();
116 116
117 // Helper to get the Extension::CreateFlags for the installing extension. 117 // Helper to get the Extension::CreateFlags for the installing extension.
118 int GetFlags(); 118 int GetFlags();
119 119
120 const Extension* extension() { return install_checker_.extension().get(); }
121
122 // The service we will report results back to. 120 // The service we will report results back to.
123 base::WeakPtr<ExtensionService> service_weak_; 121 base::WeakPtr<ExtensionService> service_weak_;
124 122
125 // The pathname of the directory to load from, which is an absolute path 123 // The pathname of the directory to load from, which is an absolute path
126 // after GetAbsolutePath has been called. 124 // after GetAbsolutePath has been called.
127 base::FilePath extension_path_; 125 base::FilePath extension_path_;
128 126
127 // The extension being installed.
128 scoped_refptr<const Extension> extension_;
129
129 // If true and the extension contains plugins, we prompt the user before 130 // If true and the extension contains plugins, we prompt the user before
130 // loading. 131 // loading.
131 bool prompt_for_plugins_; 132 bool prompt_for_plugins_;
132 133
133 // Whether to require the extension installed to have a modern manifest 134 // Whether to require the extension installed to have a modern manifest
134 // version. 135 // version.
135 bool require_modern_manifest_version_; 136 bool require_modern_manifest_version_;
136 137
137 // Whether or not to be noisy (show a dialog) on failure. Defaults to true. 138 // Whether or not to be noisy (show a dialog) on failure. Defaults to true.
138 bool be_noisy_on_failure_; 139 bool be_noisy_on_failure_;
139 140
140 // Checks management policies and requirements before the extension can be 141 // Checks management policies and requirements before the extension can be
141 // installed. 142 // installed.
142 ExtensionInstallChecker install_checker_; 143 ExtensionInstallChecker install_checker_;
143 144
144 CompletionCallback callback_; 145 CompletionCallback callback_;
145 146
146 DISALLOW_COPY_AND_ASSIGN(UnpackedInstaller); 147 DISALLOW_COPY_AND_ASSIGN(UnpackedInstaller);
147 }; 148 };
148 149
149 } // namespace extensions 150 } // namespace extensions
150 151
151 #endif // CHROME_BROWSER_EXTENSIONS_UNPACKED_INSTALLER_H_ 152 #endif // CHROME_BROWSER_EXTENSIONS_UNPACKED_INSTALLER_H_
OLDNEW
« no previous file with comments | « chrome/browser/extensions/requirements_checker_browsertest.cc ('k') | chrome/browser/extensions/unpacked_installer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698