Index: chrome/browser/automation/testing_automation_provider.cc |
diff --git a/chrome/browser/automation/testing_automation_provider.cc b/chrome/browser/automation/testing_automation_provider.cc |
index d25ed44f3abb0890c2dda850491cd715f37acd3c..90e0d43440da2cbce96fffa29764e72c2bd8a509 100644 |
--- a/chrome/browser/automation/testing_automation_provider.cc |
+++ b/chrome/browser/automation/testing_automation_provider.cc |
@@ -3945,6 +3945,7 @@ void TestingAutomationProvider::InstallExtension( |
DictionaryValue* args, IPC::Message* reply_message) { |
FilePath::StringType path_string; |
bool with_ui; |
+ bool from_webstore = false; |
Browser* browser; |
std::string error_msg; |
if (!GetBrowserFromJSONArgs(args, &browser, &error_msg)) { |
@@ -3961,6 +3962,8 @@ void TestingAutomationProvider::InstallExtension( |
"Missing or invalid 'with_ui'"); |
return; |
} |
+ args->GetBoolean("from_webstore", &from_webstore); |
+ |
ExtensionService* service = browser->profile()->GetExtensionService(); |
ExtensionProcessManager* manager = |
browser->profile()->GetExtensionProcessManager(); |
@@ -3983,6 +3986,8 @@ void TestingAutomationProvider::InstallExtension( |
if (!with_ui) |
installer->set_allow_silent_install(true); |
installer->set_install_cause(extension_misc::INSTALL_CAUSE_AUTOMATION); |
+ if (from_webstore) |
+ installer->set_creation_flags(Extension::FROM_WEBSTORE); |
installer->InstallCrx(extension_path); |
} else { |
scoped_refptr<extensions::UnpackedInstaller> installer( |