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

Unified Diff: chrome/browser/sync/glue/extension_util.cc

Issue 3040014: Merge 53102 - Disallow syncing of extensions with third-party update URLs or ... (Closed) Base URL: svn://svn.chromium.org/chrome/branches/472/src/
Patch Set: Created 10 years, 5 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/browser/extensions/extension_updater.cc ('k') | chrome/browser/sync/glue/extension_util_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/sync/glue/extension_util.cc
===================================================================
--- chrome/browser/sync/glue/extension_util.cc (revision 53364)
+++ chrome/browser/sync/glue/extension_util.cc (working copy)
@@ -12,6 +12,7 @@
#include "chrome/browser/extensions/extensions_service.h"
#include "chrome/browser/sync/protocol/extension_specifics.pb.h"
#include "chrome/common/extensions/extension.h"
+#include "chrome/common/extensions/extension_constants.h"
#include "googleurl/src/gurl.h"
namespace browser_sync {
@@ -33,6 +34,26 @@
return false;
}
+ // 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 (!extension.update_url().is_empty() &&
+ (extension.update_url() !=
+ GURL(extension_urls::kGalleryUpdateHttpUrl)) &&
+ (extension.update_url() !=
+ GURL(extension_urls::kGalleryUpdateHttpsUrl))) {
+ return false;
+ }
+
+ // Disallow extensions with native code plugins.
+ //
+ // TODO(akalin): Relax this restriction once we've put in UI to
+ // approve synced extensions.
+ if (!extension.plugins().empty()) {
+ return false;
+ }
+
return true;
}
« no previous file with comments | « chrome/browser/extensions/extension_updater.cc ('k') | chrome/browser/sync/glue/extension_util_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698