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

Unified Diff: chrome/browser/extensions/extension_browsertest.cc

Issue 2350733005: [Extensions] Fix a bug in the startup pages override bubble (Closed)
Patch Set: Trim includes Created 4 years, 3 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
Index: chrome/browser/extensions/extension_browsertest.cc
diff --git a/chrome/browser/extensions/extension_browsertest.cc b/chrome/browser/extensions/extension_browsertest.cc
index a7703a2c91b42fb727de1f629b8cc139d75aac3a..5d6a95c96f37bdc03ddec6a94a65b988c6608b06 100644
--- a/chrome/browser/extensions/extension_browsertest.cc
+++ b/chrome/browser/extensions/extension_browsertest.cc
@@ -389,14 +389,9 @@ const Extension* ExtensionBrowserTest::UpdateExtensionWaitForIdle(
const std::string& id,
const base::FilePath& path,
int expected_change) {
- return InstallOrUpdateExtension(id,
- path,
- INSTALL_UI_TYPE_NONE,
- expected_change,
- Manifest::INTERNAL,
- browser(),
- Extension::NO_FLAGS,
- false);
+ return InstallOrUpdateExtension(id, path, INSTALL_UI_TYPE_NONE,
+ expected_change, Manifest::INTERNAL,
+ browser(), Extension::NO_FLAGS, false, false);
}
const Extension* ExtensionBrowserTest::InstallExtensionFromWebstore(
@@ -404,7 +399,7 @@ const Extension* ExtensionBrowserTest::InstallExtensionFromWebstore(
int expected_change) {
return InstallOrUpdateExtension(
std::string(), path, INSTALL_UI_TYPE_AUTO_CONFIRM, expected_change,
- Manifest::INTERNAL, browser(), Extension::FROM_WEBSTORE, true);
+ Manifest::INTERNAL, browser(), Extension::FROM_WEBSTORE, true, false);
}
const Extension* ExtensionBrowserTest::InstallOrUpdateExtension(
@@ -412,14 +407,9 @@ const Extension* ExtensionBrowserTest::InstallOrUpdateExtension(
const base::FilePath& path,
InstallUIType ui_type,
int expected_change) {
- return InstallOrUpdateExtension(id,
- path,
- ui_type,
- expected_change,
- Manifest::INTERNAL,
- browser(),
- Extension::NO_FLAGS,
- true);
+ return InstallOrUpdateExtension(id, path, ui_type, expected_change,
+ Manifest::INTERNAL, browser(),
+ Extension::NO_FLAGS, true, false);
}
const Extension* ExtensionBrowserTest::InstallOrUpdateExtension(
@@ -429,14 +419,9 @@ const Extension* ExtensionBrowserTest::InstallOrUpdateExtension(
int expected_change,
Browser* browser,
Extension::InitFromValueFlags creation_flags) {
- return InstallOrUpdateExtension(id,
- path,
- ui_type,
- expected_change,
- Manifest::INTERNAL,
- browser,
- creation_flags,
- true);
+ return InstallOrUpdateExtension(id, path, ui_type, expected_change,
+ Manifest::INTERNAL, browser, creation_flags,
+ true, false);
}
const Extension* ExtensionBrowserTest::InstallOrUpdateExtension(
@@ -445,14 +430,9 @@ const Extension* ExtensionBrowserTest::InstallOrUpdateExtension(
InstallUIType ui_type,
int expected_change,
Manifest::Location install_source) {
- return InstallOrUpdateExtension(id,
- path,
- ui_type,
- expected_change,
- install_source,
- browser(),
- Extension::NO_FLAGS,
- true);
+ return InstallOrUpdateExtension(id, path, ui_type, expected_change,
+ install_source, browser(),
+ Extension::NO_FLAGS, true, false);
}
const Extension* ExtensionBrowserTest::InstallOrUpdateExtension(
@@ -463,7 +443,8 @@ const Extension* ExtensionBrowserTest::InstallOrUpdateExtension(
Manifest::Location install_source,
Browser* browser,
Extension::InitFromValueFlags creation_flags,
- bool install_immediately) {
+ bool install_immediately,
+ bool grant_permissions) {
ExtensionService* service =
extensions::ExtensionSystem::Get(profile())->extension_service();
ExtensionRegistry* registry = ExtensionRegistry::Get(profile());
@@ -503,6 +484,7 @@ const Extension* ExtensionBrowserTest::InstallOrUpdateExtension(
installer->set_creation_flags(creation_flags);
installer->set_install_source(install_source);
installer->set_install_immediately(install_immediately);
+ installer->set_allow_silent_install(grant_permissions);
if (!installer->is_gallery_install()) {
installer->set_off_store_install_allow_reason(
extensions::CrxInstaller::OffStoreInstallAllowedInTest);

Powered by Google App Engine
This is Rietveld 408576698