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

Unified Diff: chrome/browser/automation/testing_automation_provider.cc

Issue 10540066: [pyauto] Add ability to force install an extension with experimental perms (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 6 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | chrome/test/pyautolib/pyauto.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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(
« no previous file with comments | « no previous file | chrome/test/pyautolib/pyauto.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698