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

Unified Diff: chrome/browser/extensions/webstore_installer.h

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
Index: chrome/browser/extensions/webstore_installer.h
diff --git a/chrome/browser/extensions/webstore_installer.h b/chrome/browser/extensions/webstore_installer.h
index b1e7b5d55867b07043dffb0b15686a6ee55fbe07..bea6d6d692b7c33955c78c8dc6715ddbc330dd9d 100644
--- a/chrome/browser/extensions/webstore_installer.h
+++ b/chrome/browser/extensions/webstore_installer.h
@@ -47,11 +47,17 @@ class WebstoreInstaller : public content::NotificationObserver,
const std::string& error) = 0;
};
- // If added to the WebstoreInstaller, an Approval indicates that the user has
- // already approved the installation and that the CrxInstaller can bypass its
- // install prompt.
+ // Contains information about what parts of the extension install process can
+ // be skipped or modified. If one of these is present, it means that a CRX
+ // download was initiated by WebstoreInstaller. The Approval instance should
+ // be checked further for additional details.
struct Approval : public content::DownloadItem::ExternalData {
- Approval();
+ static scoped_ptr<Approval> CreateWithInstallPrompt(Profile* profile);
+ static scoped_ptr<Approval> CreateWithNoInstallPrompt(
+ Profile* profile,
+ const std::string& extension_id,
+ scoped_ptr<base::DictionaryValue> parsed_manifest);
+
virtual ~Approval();
// The extension id that was approved for installation.
@@ -69,6 +75,15 @@ class WebstoreInstaller : public content::NotificationObserver,
// Whether to skip the post install UI like the extension installed bubble.
bool skip_post_install_ui;
+
+ // Whether to skip the install dialog once the extension has been downloaded
+ // and unpacked. One reason this can be true is that in the normal webstore
+ // installation, the dialog is shown earlier, before any download is done,
+ // so there's no need to show it again.
+ bool skip_install_dialog;
+
+ private:
+ Approval();
};
// Gets the Approval associated with the |download|, or NULL if there's none.
« no previous file with comments | « chrome/browser/extensions/webstore_inline_installer.cc ('k') | chrome/browser/extensions/webstore_installer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698