diff options
author | yoz@chromium.org <yoz@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-12-19 19:54:28 +0000 |
---|---|---|
committer | yoz@chromium.org <yoz@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-12-19 19:54:28 +0000 |
commit | 7576451096ac79de2031a0ce55ab26da195b2f7b (patch) | |
tree | 27ecd3acd667999a976009bb06f6cacc01708391 /chrome/common/extensions/extension.cc | |
parent | c0f298de177a284fd0d8e1517605b75a3d1d4d7d (diff) | |
download | chromium_src-7576451096ac79de2031a0ce55ab26da195b2f7b.zip chromium_src-7576451096ac79de2031a0ce55ab26da195b2f7b.tar.gz chromium_src-7576451096ac79de2031a0ce55ab26da195b2f7b.tar.bz2 |
Make extension installs from sync be from_webstore.
BUG=107783
TEST=enable sync, install extension; check that when synced on another browser, its Preferences entry has from_webstore: true.
Review URL: http://codereview.chromium.org/8965034
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@115013 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/common/extensions/extension.cc')
-rw-r--r-- | chrome/common/extensions/extension.cc | 11 |
1 files changed, 3 insertions, 8 deletions
diff --git a/chrome/common/extensions/extension.cc b/chrome/common/extensions/extension.cc index 2bcc581..5c7cab6 100644 --- a/chrome/common/extensions/extension.cc +++ b/chrome/common/extensions/extension.cc @@ -2879,8 +2879,7 @@ bool Extension::CanCaptureVisiblePage(const GURL& page_url, } bool Extension::UpdatesFromGallery() const { - return update_url() == extension_urls::GetWebstoreUpdateUrl(false) || - update_url() == extension_urls::GetWebstoreUpdateUrl(true); + return extension_urls::IsWebstoreUpdateUrl(update_url()); } bool Extension::OverlapsWithOrigin(const GURL& origin) const { @@ -2914,11 +2913,8 @@ Extension::SyncType Extension::GetSyncType() const { // // TODO(akalin): Relax this restriction once we've put in UI to // approve synced extensions. - if (!update_url().is_empty() && - (update_url() != extension_urls::GetWebstoreUpdateUrl(false)) && - (update_url() != extension_urls::GetWebstoreUpdateUrl(true))) { + if (!update_url().is_empty() && !UpdatesFromGallery()) return SYNC_TYPE_NONE; - } // Disallow extensions with native code plugins. // @@ -2934,8 +2930,7 @@ Extension::SyncType Extension::GetSyncType() const { case Extension::TYPE_USER_SCRIPT: // We only want to sync user scripts with gallery update URLs. - if (update_url() == extension_urls::GetWebstoreUpdateUrl(true) || - update_url() == extension_urls::GetWebstoreUpdateUrl(false)) + if (UpdatesFromGallery()) return SYNC_TYPE_EXTENSION; else return SYNC_TYPE_NONE; |