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

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

Issue 9152010: Merge 116258 - Hide downloads of extensions blacklist from web request API. (Closed) Base URL: svn://svn.chromium.org/chrome/branches/963/src/
Patch Set: Created 8 years, 11 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_constants.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/common/extensions/extension_constants.cc
===================================================================
--- chrome/common/extensions/extension_constants.cc (revision 116900)
+++ chrome/common/extensions/extension_constants.cc (working copy)
@@ -1,4 +1,4 @@
-// Copyright (c) 2011 The Chromium Authors. All rights reserved.
+// Copyright (c) 2012 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
@@ -458,6 +458,11 @@
"http://clients2.google.com/service/update2/crx";
const char kGalleryUpdateHttpsUrl[] =
"https://clients2.google.com/service/update2/crx";
+// TODO(battre): Delete the HTTP URL once the blacklist is downloaded via HTTPS.
+const char kExtensionBlocklistUrlPrefix[] =
+ "http://www.gstatic.com/chrome/extensions/blacklist";
+const char kExtensionBlocklistHttpsUrlPrefix[] =
+ "https://www.gstatic.com/chrome/extensions/blacklist";
GURL GetWebstoreUpdateUrl(bool secure) {
CommandLine* cmdline = CommandLine::ForCurrentProcess();
@@ -472,6 +477,17 @@
update_url == GetWebstoreUpdateUrl(true);
}
+bool IsBlacklistUpdateUrl(const GURL& url) {
+ // The extension blacklist URL is returned from the update service and
+ // therefore not determined by Chromium. If the location of the blacklist file
+ // ever changes, we need to update this function. A DCHECK in the
+ // ExtensionUpdater ensures that we notice a change. This is the full URL
+ // of a blacklist:
+ // http://www.gstatic.com/chrome/extensions/blacklist/l_0_0_0_7.txt
+ return StartsWithASCII(url.spec(), kExtensionBlocklistUrlPrefix, true) ||
+ StartsWithASCII(url.spec(), kExtensionBlocklistHttpsUrlPrefix, true);
+}
+
const char kGalleryBrowsePrefix[] = "https://chrome.google.com/webstore";
}
« no previous file with comments | « chrome/common/extensions/extension_constants.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698