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

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

Issue 10399069: Reland 137540 - Disable off-store extension installs by default. Also get rid of ExtensionService::… (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 7 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 | « chrome/browser/extensions/crx_installer.cc ('k') | chrome/browser/extensions/extension_service.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/extensions/crx_installer_browsertest.cc
diff --git a/chrome/browser/extensions/crx_installer_browsertest.cc b/chrome/browser/extensions/crx_installer_browsertest.cc
index a98560e43ca70553a344bec30928907d10229ced..efaaf0a4c8fa774ed1cb11cfc7e6d78c4adc184f 100644
--- a/chrome/browser/extensions/crx_installer_browsertest.cc
+++ b/chrome/browser/extensions/crx_installer_browsertest.cc
@@ -14,6 +14,7 @@
#include "chrome/browser/ui/browser.h"
#include "chrome/common/chrome_switches.h"
#include "chrome/common/extensions/extension_file_util.h"
+#include "chrome/common/extensions/extension_switch_utils.h"
#include "chrome/test/base/ui_test_utils.h"
class SkBitmap;
@@ -67,10 +68,10 @@ class ExtensionCrxInstallerTest : public ExtensionBrowserTest {
return false;
scoped_ptr<WebstoreInstaller::Approval> approval(
- new WebstoreInstaller::Approval);
- approval->extension_id = id;
- approval->profile = browser()->profile();
- approval->parsed_manifest.reset(parsed_manifest);
+ WebstoreInstaller::Approval::CreateWithNoInstallPrompt(
+ browser()->profile(),
+ id,
+ scoped_ptr<base::DictionaryValue>(parsed_manifest)));
scoped_refptr<CrxInstaller> installer(
CrxInstaller::Create(service,
@@ -124,6 +125,9 @@ IN_PROC_BROWSER_TEST_F(ExtensionCrxInstallerTest, PlatformAppCrx) {
}
IN_PROC_BROWSER_TEST_F(ExtensionCrxInstallerTest, PackAndInstallExtension) {
+ if (!extensions::switch_utils::IsOffStoreInstallEnabled())
+ return;
+
const int kNumDownloadsExpected = 1;
const bool kExpectFileSelectDialog = false;
« no previous file with comments | « chrome/browser/extensions/crx_installer.cc ('k') | chrome/browser/extensions/extension_service.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698