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

Unified Diff: chrome/common/extensions/extension.cc

Issue 16283002: Move Extension::UpdatesFromGallery to ManifestURL. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 7 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/common/extensions/extension.h ('k') | chrome/common/extensions/manifest_url_handler.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/common/extensions/extension.cc
diff --git a/chrome/common/extensions/extension.cc b/chrome/common/extensions/extension.cc
index 720d8cf43b99800bd4915863be09da8dab64fa08..c9197c29763b5f72c0d619f3983adbff0e2626c0 100644
--- a/chrome/common/extensions/extension.cc
+++ b/chrome/common/extensions/extension.cc
@@ -424,10 +424,6 @@ GURL Extension::GetFullLaunchURL() const {
url().Resolve(launch_local_path());
}
-bool Extension::UpdatesFromGallery() const {
- return extension_urls::IsWebstoreUpdateUrl(ManifestURL::GetUpdateURL(this));
-}
-
bool Extension::OverlapsWithOrigin(const GURL& origin) const {
if (url() == origin)
return true;
@@ -458,7 +454,8 @@ Extension::SyncType Extension::GetSyncType() const {
//
// TODO(akalin): Relax this restriction once we've put in UI to
// approve synced extensions.
- if (!ManifestURL::GetUpdateURL(this).is_empty() && !UpdatesFromGallery())
+ if (!ManifestURL::GetUpdateURL(this).is_empty() &&
+ !ManifestURL::UpdatesFromGallery(this))
return SYNC_TYPE_NONE;
// Disallow extensions with native code plugins.
@@ -474,7 +471,7 @@ Extension::SyncType Extension::GetSyncType() const {
case Manifest::TYPE_USER_SCRIPT:
// We only want to sync user scripts with gallery update URLs.
- if (UpdatesFromGallery())
+ if (ManifestURL::UpdatesFromGallery(this))
return SYNC_TYPE_EXTENSION;
else
return SYNC_TYPE_NONE;
« no previous file with comments | « chrome/common/extensions/extension.h ('k') | chrome/common/extensions/manifest_url_handler.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698