OLD | NEW |
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" |
(...skipping 229 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
240 void ReportFailureFromUIThread(const CrxInstallerError& error); | 240 void ReportFailureFromUIThread(const CrxInstallerError& error); |
241 void ReportSuccessFromFileThread(); | 241 void ReportSuccessFromFileThread(); |
242 void ReportSuccessFromUIThread(); | 242 void ReportSuccessFromUIThread(); |
243 void HandleIsBlacklistedResponse(const base::Closure& on_success, | 243 void HandleIsBlacklistedResponse(const base::Closure& on_success, |
244 bool success); | 244 bool success); |
245 void NotifyCrxInstallComplete(bool success); | 245 void NotifyCrxInstallComplete(bool success); |
246 | 246 |
247 // Deletes temporary directory and crx file if needed. | 247 // Deletes temporary directory and crx file if needed. |
248 void CleanupTempFiles(); | 248 void CleanupTempFiles(); |
249 | 249 |
250 // Creates sequenced task runner for extension install file I/O operations. | 250 // Checks whether the current installation is initiated by the user from |
251 scoped_refptr<base::SequencedTaskRunner> CreateSequencedTaskRunner(); | 251 // the extension settings page to update an existing extension or app. |
| 252 void CheckUpdateFromSettingsPage(); |
| 253 |
| 254 // Show re-enable prompt if the update is initiated from the settings page |
| 255 // and needs additional permissions. |
| 256 void ConfirmReEnable(); |
252 | 257 |
253 // The file we're installing. | 258 // The file we're installing. |
254 base::FilePath source_file_; | 259 base::FilePath source_file_; |
255 | 260 |
256 // The URL the file was downloaded from. | 261 // The URL the file was downloaded from. |
257 GURL download_url_; | 262 GURL download_url_; |
258 | 263 |
259 // The directory extensions are installed to. | 264 // The directory extensions are installed to. |
260 base::FilePath install_directory_; | 265 base::FilePath install_directory_; |
261 | 266 |
(...skipping 124 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
386 bool has_requirement_errors_; | 391 bool has_requirement_errors_; |
387 | 392 |
388 bool install_wait_for_idle_; | 393 bool install_wait_for_idle_; |
389 | 394 |
390 // Sequenced task runner where file I/O operations will be performed. | 395 // Sequenced task runner where file I/O operations will be performed. |
391 scoped_refptr<base::SequencedTaskRunner> installer_task_runner_; | 396 scoped_refptr<base::SequencedTaskRunner> installer_task_runner_; |
392 | 397 |
393 // Used to show the install dialog. | 398 // Used to show the install dialog. |
394 ExtensionInstallPrompt::ShowDialogCallback show_dialog_callback_; | 399 ExtensionInstallPrompt::ShowDialogCallback show_dialog_callback_; |
395 | 400 |
| 401 // Whether the update is initiated by the user from the extension settings |
| 402 // page. |
| 403 bool update_from_settings_page_; |
| 404 |
396 DISALLOW_COPY_AND_ASSIGN(CrxInstaller); | 405 DISALLOW_COPY_AND_ASSIGN(CrxInstaller); |
397 }; | 406 }; |
398 | 407 |
399 } // namespace extensions | 408 } // namespace extensions |
400 | 409 |
401 #endif // CHROME_BROWSER_EXTENSIONS_CRX_INSTALLER_H_ | 410 #endif // CHROME_BROWSER_EXTENSIONS_CRX_INSTALLER_H_ |
OLD | NEW |