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

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

Issue 11054006: Make application shortcuts point to app_host.exe, install App Host during app installation. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Rearranged code for unpacked_installer.cc; moved App Host code from chrome_launch_support to app_ho… Created 8 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 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_CRX_INSTALLER_H_ 5 #ifndef CHROME_BROWSER_EXTENSIONS_CRX_INSTALLER_H_
6 #define CHROME_BROWSER_EXTENSIONS_CRX_INSTALLER_H_ 6 #define CHROME_BROWSER_EXTENSIONS_CRX_INSTALLER_H_
7 7
8 #include <string> 8 #include <string>
9 9
10 #include "base/compiler_specific.h" 10 #include "base/compiler_specific.h"
11 #include "base/file_path.h" 11 #include "base/file_path.h"
12 #include "base/memory/ref_counted.h" 12 #include "base/memory/ref_counted.h"
13 #include "base/memory/weak_ptr.h" 13 #include "base/memory/weak_ptr.h"
14 #include "base/version.h" 14 #include "base/version.h"
15 #include "chrome/browser/extensions/app_host_installer.h"
15 #include "chrome/browser/extensions/crx_installer_error.h" 16 #include "chrome/browser/extensions/crx_installer_error.h"
16 #include "chrome/browser/extensions/extension_install_prompt.h" 17 #include "chrome/browser/extensions/extension_install_prompt.h"
17 #include "chrome/browser/extensions/sandboxed_unpacker.h" 18 #include "chrome/browser/extensions/sandboxed_unpacker.h"
18 #include "chrome/browser/extensions/webstore_installer.h" 19 #include "chrome/browser/extensions/webstore_installer.h"
19 #include "chrome/common/extensions/extension.h" 20 #include "chrome/common/extensions/extension.h"
20 #include "chrome/common/web_apps.h" 21 #include "chrome/common/web_apps.h"
21 #include "sync/api/string_ordinal.h" 22 #include "sync/api/string_ordinal.h"
22 23
23 class ExtensionService; 24 class ExtensionService;
24 class SkBitmap; 25 class SkBitmap;
(...skipping 182 matching lines...) Expand 10 before | Expand all | Expand 10 after
207 // Called on the UI thread to start the requirements check on the extension. 208 // Called on the UI thread to start the requirements check on the extension.
208 void CheckRequirements(); 209 void CheckRequirements();
209 210
210 // Runs on the UI thread. Callback from RequirementsChecker. 211 // Runs on the UI thread. Callback from RequirementsChecker.
211 void OnRequirementsChecked(std::vector<std::string> requirement_errors); 212 void OnRequirementsChecked(std::vector<std::string> requirement_errors);
212 213
213 // Runs on the UI thread. Confirms with the user (via ExtensionInstallPrompt) 214 // Runs on the UI thread. Confirms with the user (via ExtensionInstallPrompt)
214 // that it is OK to install this extension. 215 // that it is OK to install this extension.
215 void ConfirmInstall(); 216 void ConfirmInstall();
216 217
217 // Runs on File thread. Install the unpacked extension into the profile and 218 // Runs on File thread. Ensures that App Host is installed, and then
benwells 2012/10/04 07:53:01 Nit: File -> FILE. Nit: This function does more t
huangs 2012/10/04 22:56:42 Done. Also fixed every instance of "file thread"
218 // notify the frontend. 219 // proceeds to post CompleteExtensionInstall().
erikwright (departed) 2012/10/04 01:28:16 CompleteInstall
huangs 2012/10/04 22:56:42 Done.
220 void BeginInstall();
221
222 // Callback founction for AppHostInstaller.
erikwright (departed) 2012/10/04 01:28:16 founction
huangs 2012/10/04 22:56:42 Done.
223 void OnAppHostInstallation(bool success);
224
benwells 2012/10/04 07:53:01 Nit: File -> FILE
huangs 2012/10/04 22:56:42 Done.
225 // Runs on File thread. Installs the unpacked extension into the profile and
226 // notifies the frontend.
219 void CompleteInstall(); 227 void CompleteInstall();
220 228
221 // Result reporting. 229 // Result reporting.
222 void ReportFailureFromFileThread(const CrxInstallerError& error); 230 void ReportFailureFromFileThread(const CrxInstallerError& error);
223 void ReportFailureFromUIThread(const CrxInstallerError& error); 231 void ReportFailureFromUIThread(const CrxInstallerError& error);
224 void ReportSuccessFromFileThread(); 232 void ReportSuccessFromFileThread();
225 void ReportSuccessFromUIThread(); 233 void ReportSuccessFromUIThread();
226 void NotifyCrxInstallComplete(const Extension* extension); 234 void NotifyCrxInstallComplete(const Extension* extension);
227 235
228 // The file we're installing. 236 // The file we're installing.
(...skipping 123 matching lines...) Expand 10 before | Expand all | Expand 10 after
352 360
353 // Whether we should produce an error if the manifest declares requirements 361 // Whether we should produce an error if the manifest declares requirements
354 // that are not met. If false and there is an unmet requirement, the install 362 // that are not met. If false and there is an unmet requirement, the install
355 // will continue but the extension will be distabled. 363 // will continue but the extension will be distabled.
356 bool error_on_unsupported_requirements_; 364 bool error_on_unsupported_requirements_;
357 365
358 scoped_ptr<RequirementsChecker> requirements_checker_; 366 scoped_ptr<RequirementsChecker> requirements_checker_;
359 367
360 bool has_requirement_errors_; 368 bool has_requirement_errors_;
361 369
370 // Helper to install App Host.
371 AppHostInstaller app_host_installer_;
372
362 DISALLOW_COPY_AND_ASSIGN(CrxInstaller); 373 DISALLOW_COPY_AND_ASSIGN(CrxInstaller);
363 }; 374 };
364 375
365 } // namespace extensions 376 } // namespace extensions
366 377
367 #endif // CHROME_BROWSER_EXTENSIONS_CRX_INSTALLER_H_ 378 #endif // CHROME_BROWSER_EXTENSIONS_CRX_INSTALLER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698