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

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

Issue 7692003: Revert 97482 - Apps/Extensions Sync refactoring -- delete most of the old glue, implement new syn... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 9 years, 4 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/extension_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/common/extensions/extension.cc
===================================================================
--- chrome/common/extensions/extension.cc (revision 97482)
+++ chrome/common/extensions/extension.cc (working copy)
@@ -282,7 +282,7 @@
// deterministicly choose a location.
CHECK(loc1_rank != loc2_rank);
- // Highest rank has highest priority.
+ // Lowest rank has highest priority.
return (loc1_rank > loc2_rank ? loc1 : loc2 );
}
@@ -2821,52 +2821,6 @@
return web_extent().OverlapsWith(origin_only_pattern_list);
}
-Extension::SyncType Extension::GetSyncType() const {
- // TODO(akalin): Figure out if we need to allow some other types.
- if (location() != Extension::INTERNAL) {
- // We have a non-standard location.
- return SYNC_TYPE_NONE;
- }
-
- // Disallow extensions with non-gallery auto-update URLs for now.
- //
- // TODO(akalin): Relax this restriction once we've put in UI to
- // approve synced extensions.
- if (!update_url().is_empty() &&
- (update_url() != GalleryUpdateUrl(false)) &&
- (update_url() != GalleryUpdateUrl(true))) {
- return SYNC_TYPE_NONE;
- }
-
- // Disallow extensions with native code plugins.
- //
- // TODO(akalin): Relax this restriction once we've put in UI to
- // approve synced extensions.
- if (!plugins().empty()) {
- return SYNC_TYPE_NONE;
- }
-
- switch (GetType()) {
- case Extension::TYPE_EXTENSION:
- return SYNC_TYPE_EXTENSION;
-
- case Extension::TYPE_USER_SCRIPT:
- // We only want to sync user scripts with gallery update URLs.
- if (update_url() == GalleryUpdateUrl(true) ||
- update_url() == GalleryUpdateUrl(false))
- return SYNC_TYPE_EXTENSION;
- else
- return SYNC_TYPE_NONE;
-
- case Extension::TYPE_HOSTED_APP:
- case Extension::TYPE_PACKAGED_APP:
- return SYNC_TYPE_APP;
-
- default:
- return SYNC_TYPE_NONE;
- }
-}
-
ExtensionInfo::ExtensionInfo(const DictionaryValue* manifest,
const std::string& id,
const FilePath& path,
« no previous file with comments | « chrome/common/extensions/extension.h ('k') | chrome/common/extensions/extension_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698