| Index: chrome/browser/extensions/extension_service.cc
|
| diff --git a/chrome/browser/extensions/extension_service.cc b/chrome/browser/extensions/extension_service.cc
|
| index a74de002987077876c71a5b99854424acaa926b9..7e3675d2aef1e16f5ff9c8ab2a45219c014d34bb 100644
|
| --- a/chrome/browser/extensions/extension_service.cc
|
| +++ b/chrome/browser/extensions/extension_service.cc
|
| @@ -267,6 +267,7 @@ void ExtensionService::AddProviderForTesting(
|
|
|
| bool ExtensionService::OnExternalExtensionUpdateUrlFound(
|
| const std::string& id,
|
| + const std::string& install_parameter,
|
| const GURL& update_url,
|
| Manifest::Location location,
|
| int creation_flags,
|
| @@ -294,7 +295,12 @@ bool ExtensionService::OnExternalExtensionUpdateUrlFound(
|
| // source. In this case, signal that this extension will not be
|
| // installed by returning false.
|
| if (!pending_extension_manager()->AddFromExternalUpdateUrl(
|
| - id, update_url, location, creation_flags, mark_acknowledged)) {
|
| + id,
|
| + install_parameter,
|
| + update_url,
|
| + location,
|
| + creation_flags,
|
| + mark_acknowledged)) {
|
| return false;
|
| }
|
|
|
| @@ -1847,7 +1853,8 @@ void ExtensionService::AddComponentExtension(const Extension* extension) {
|
| AddNewOrUpdatedExtension(extension,
|
| Extension::ENABLED_COMPONENT,
|
| extensions::NOT_BLACKLISTED,
|
| - syncer::StringOrdinal());
|
| + syncer::StringOrdinal(),
|
| + std::string());
|
| return;
|
| }
|
|
|
| @@ -2107,6 +2114,7 @@ void ExtensionService::OnExtensionInstalled(
|
|
|
| const std::string& id = extension->id();
|
| bool initial_enable = ShouldEnableOnInstall(extension);
|
| + std::string install_parameter;
|
| const extensions::PendingExtensionInfo* pending_extension_info = NULL;
|
| if ((pending_extension_info = pending_extension_manager()->GetById(id))) {
|
| if (!pending_extension_info->ShouldAllowInstall(extension)) {
|
| @@ -2129,6 +2137,7 @@ void ExtensionService::OnExtensionInstalled(
|
| return;
|
| }
|
|
|
| + install_parameter = pending_extension_info->install_parameter();
|
| pending_extension_manager()->Remove(id);
|
| } else {
|
| // We explicitly want to re-enable an uninstalled external
|
| @@ -2194,7 +2203,8 @@ void ExtensionService::OnExtensionInstalled(
|
| initial_state,
|
| blacklisted_for_malware,
|
| extensions::ExtensionPrefs::DELAY_REASON_WAIT_FOR_IDLE,
|
| - page_ordinal);
|
| + page_ordinal,
|
| + install_parameter);
|
|
|
| // Transfer ownership of |extension|.
|
| delayed_installs_.Insert(extension);
|
| @@ -2212,7 +2222,8 @@ void ExtensionService::OnExtensionInstalled(
|
| initial_state,
|
| blacklisted_for_malware,
|
| extensions::ExtensionPrefs::DELAY_REASON_GC,
|
| - page_ordinal);
|
| + page_ordinal,
|
| + install_parameter);
|
| delayed_installs_.Insert(extension);
|
| } else if (status != IMPORT_STATUS_OK) {
|
| if (status == IMPORT_STATUS_UNSATISFIED) {
|
| @@ -2221,14 +2232,16 @@ void ExtensionService::OnExtensionInstalled(
|
| initial_state,
|
| blacklisted_for_malware,
|
| extensions::ExtensionPrefs::DELAY_REASON_WAIT_FOR_IMPORTS,
|
| - page_ordinal);
|
| + page_ordinal,
|
| + install_parameter);
|
| delayed_installs_.Insert(extension);
|
| }
|
| } else {
|
| AddNewOrUpdatedExtension(extension,
|
| initial_state,
|
| blacklist_state,
|
| - page_ordinal);
|
| + page_ordinal,
|
| + install_parameter);
|
| }
|
| }
|
|
|
| @@ -2236,14 +2249,16 @@ void ExtensionService::AddNewOrUpdatedExtension(
|
| const Extension* extension,
|
| Extension::State initial_state,
|
| extensions::BlacklistState blacklist_state,
|
| - const syncer::StringOrdinal& page_ordinal) {
|
| + const syncer::StringOrdinal& page_ordinal,
|
| + const std::string& install_parameter) {
|
| CHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
|
| const bool blacklisted_for_malware =
|
| blacklist_state == extensions::BLACKLISTED_MALWARE;
|
| extension_prefs_->OnExtensionInstalled(extension,
|
| initial_state,
|
| blacklisted_for_malware,
|
| - page_ordinal);
|
| + page_ordinal,
|
| + install_parameter);
|
| delayed_installs_.Remove(extension->id());
|
| if (InstallVerifier::NeedsVerification(*extension)) {
|
| system_->install_verifier()->Add(extension->id(),
|
|
|