| 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" |
| 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/crx_installer_error.h" | 15 #include "chrome/browser/extensions/crx_installer_error.h" |
| 16 #include "chrome/browser/extensions/extension_install_prompt.h" | 16 #include "chrome/browser/extensions/extension_install_prompt.h" |
| 17 #include "chrome/browser/extensions/sandboxed_unpacker.h" | 17 #include "chrome/browser/extensions/sandboxed_unpacker.h" |
| 18 #include "chrome/browser/extensions/webstore_installer.h" | 18 #include "chrome/browser/extensions/webstore_installer.h" |
| 19 #include "chrome/common/extensions/extension.h" | 19 #include "chrome/common/extensions/extension.h" |
| 20 #include "chrome/common/extensions/manifest.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 ExtensionServiceTest; | 25 class ExtensionServiceTest; |
| 25 class SkBitmap; | 26 class SkBitmap; |
| 26 | 27 |
| 27 namespace base { | 28 namespace base { |
| 28 class SequencedTaskRunner; | 29 class SequencedTaskRunner; |
| 29 } | 30 } |
| (...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 102 virtual void InstallUIAbort(bool user_initiated) OVERRIDE; | 103 virtual void InstallUIAbort(bool user_initiated) OVERRIDE; |
| 103 | 104 |
| 104 int creation_flags() const { return creation_flags_; } | 105 int creation_flags() const { return creation_flags_; } |
| 105 void set_creation_flags(int val) { creation_flags_ = val; } | 106 void set_creation_flags(int val) { creation_flags_ = val; } |
| 106 | 107 |
| 107 const GURL& download_url() const { return download_url_; } | 108 const GURL& download_url() const { return download_url_; } |
| 108 void set_download_url(const GURL& val) { download_url_ = val; } | 109 void set_download_url(const GURL& val) { download_url_ = val; } |
| 109 | 110 |
| 110 const FilePath& source_file() const { return source_file_; } | 111 const FilePath& source_file() const { return source_file_; } |
| 111 | 112 |
| 112 Extension::Location install_source() const { | 113 Manifest::Location install_source() const { |
| 113 return install_source_; | 114 return install_source_; |
| 114 } | 115 } |
| 115 void set_install_source(Extension::Location source) { | 116 void set_install_source(Manifest::Location source) { |
| 116 install_source_ = source; | 117 install_source_ = source; |
| 117 } | 118 } |
| 118 | 119 |
| 119 const std::string& expected_id() const { return expected_id_; } | 120 const std::string& expected_id() const { return expected_id_; } |
| 120 void set_expected_id(const std::string& val) { expected_id_ = val; } | 121 void set_expected_id(const std::string& val) { expected_id_ = val; } |
| 121 | 122 |
| 122 void set_expected_version(const Version& val) { | 123 void set_expected_version(const Version& val) { |
| 123 expected_version_.reset(new Version(val)); | 124 expected_version_.reset(new Version(val)); |
| 124 } | 125 } |
| 125 | 126 |
| (...skipping 126 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 252 | 253 |
| 253 // The URL the file was downloaded from. | 254 // The URL the file was downloaded from. |
| 254 GURL download_url_; | 255 GURL download_url_; |
| 255 | 256 |
| 256 // The directory extensions are installed to. | 257 // The directory extensions are installed to. |
| 257 FilePath install_directory_; | 258 FilePath install_directory_; |
| 258 | 259 |
| 259 // The location the installation came from (bundled with Chromium, registry, | 260 // The location the installation came from (bundled with Chromium, registry, |
| 260 // manual install, etc). This metadata is saved with the installation if | 261 // manual install, etc). This metadata is saved with the installation if |
| 261 // successful. Defaults to INTERNAL. | 262 // successful. Defaults to INTERNAL. |
| 262 Extension::Location install_source_; | 263 Manifest::Location install_source_; |
| 263 | 264 |
| 264 // Indicates whether the user has already approved the extension to be | 265 // Indicates whether the user has already approved the extension to be |
| 265 // installed. If true, |expected_manifest_| and |expected_id_| must match | 266 // installed. If true, |expected_manifest_| and |expected_id_| must match |
| 266 // those of the CRX. | 267 // those of the CRX. |
| 267 bool approved_; | 268 bool approved_; |
| 268 | 269 |
| 269 // For updates, external and webstore installs we have an ID we're expecting | 270 // For updates, external and webstore installs we have an ID we're expecting |
| 270 // the extension to contain. | 271 // the extension to contain. |
| 271 std::string expected_id_; | 272 std::string expected_id_; |
| 272 | 273 |
| (...skipping 115 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 388 | 389 |
| 389 // Used to show the install dialog. | 390 // Used to show the install dialog. |
| 390 ExtensionInstallPrompt::ShowDialogCallback show_dialog_callback_; | 391 ExtensionInstallPrompt::ShowDialogCallback show_dialog_callback_; |
| 391 | 392 |
| 392 DISALLOW_COPY_AND_ASSIGN(CrxInstaller); | 393 DISALLOW_COPY_AND_ASSIGN(CrxInstaller); |
| 393 }; | 394 }; |
| 394 | 395 |
| 395 } // namespace extensions | 396 } // namespace extensions |
| 396 | 397 |
| 397 #endif // CHROME_BROWSER_EXTENSIONS_CRX_INSTALLER_H_ | 398 #endif // CHROME_BROWSER_EXTENSIONS_CRX_INSTALLER_H_ |
| OLD | NEW |