summaryrefslogtreecommitdiffstats
path: root/chrome/browser/extensions/webstore_installer.h
diff options
context:
space:
mode:
authorasargent@chromium.org <asargent@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-08-23 20:27:38 +0000
committerasargent@chromium.org <asargent@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-08-23 20:27:38 +0000
commit8529082260af6508158882c090492c9b58721a9e (patch)
tree24b50513e05bfa592341c016e4e1f81b8e7d9ccc /chrome/browser/extensions/webstore_installer.h
parent444eae718087387f235234759a61a1fd0b930397 (diff)
downloadchromium_src-8529082260af6508158882c090492c9b58721a9e.zip
chromium_src-8529082260af6508158882c090492c9b58721a9e.tar.gz
chromium_src-8529082260af6508158882c090492c9b58721a9e.tar.bz2
Loosen strict manifest equality requirement during webstore installs
Right now right after an extension/app is updated in the webstore, there can be a period of skew between the webstore and the servers that download the crx file, which causes installs to fail because we generate a permissions warning prompt from the newer version of the manifest but get served an older version of the .crx file. This changes chrome to allow differences in the manifest as long as those differences aren't considered to alter the effective severity of the permissions. BUG=236099 Review URL: https://chromiumcodereview.appspot.com/23033005 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@219322 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/extensions/webstore_installer.h')
-rw-r--r--chrome/browser/extensions/webstore_installer.h13
1 files changed, 12 insertions, 1 deletions
diff --git a/chrome/browser/extensions/webstore_installer.h b/chrome/browser/extensions/webstore_installer.h
index 0f9727f..cfb88f8 100644
--- a/chrome/browser/extensions/webstore_installer.h
+++ b/chrome/browser/extensions/webstore_installer.h
@@ -76,10 +76,17 @@ class WebstoreInstaller :public content::NotificationObserver,
// be checked further for additional details.
struct Approval : public base::SupportsUserData::Data {
static scoped_ptr<Approval> CreateWithInstallPrompt(Profile* profile);
+
+ // Creates an Approval that will skip putting up an install confirmation
+ // prompt if the actual manifest from the extension to be installed matches
+ // |parsed_manifest|. The |strict_manifest_check| controls whether we want
+ // to require an exact manifest match, or are willing to tolerate a looser
+ // check just that the effective permissions are the same.
static scoped_ptr<Approval> CreateWithNoInstallPrompt(
Profile* profile,
const std::string& extension_id,
- scoped_ptr<base::DictionaryValue> parsed_manifest);
+ scoped_ptr<base::DictionaryValue> parsed_manifest,
+ bool strict_manifest_check);
virtual ~Approval();
@@ -108,6 +115,10 @@ class WebstoreInstaller :public content::NotificationObserver,
// Whether we should enable the launcher before installing the app.
bool enable_launcher;
+ // Whether we want a strict manifest equality check, or just want a match
+ // for effective permissions.
+ bool strict_manifest_check;
+
// Used to show the install dialog.
ExtensionInstallPrompt::ShowDialogCallback show_dialog_callback;