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

Unified Diff: chrome/browser/supervised_user/supervised_user_url_filter.cc

Issue 2419503002: Whitelisting one more crx download url (Closed)
Patch Set: Created 4 years, 2 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 | « no previous file | chrome/browser/supervised_user/supervised_user_url_filter_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/supervised_user/supervised_user_url_filter.cc
diff --git a/chrome/browser/supervised_user/supervised_user_url_filter.cc b/chrome/browser/supervised_user/supervised_user_url_filter.cc
index 61c93045320506ffdce619012603406ac45a5c1f..3f2ccb9b7d70f1e52403eed64721b173e34207d7 100644
--- a/chrome/browser/supervised_user/supervised_user_url_filter.cc
+++ b/chrome/browser/supervised_user/supervised_user_url_filter.cc
@@ -81,8 +81,10 @@ const char* kFilteredSchemes[] = {
};
#if defined(ENABLE_EXTENSIONS)
-const char kCrxDownloadUrl[] =
- "https://clients2.googleusercontent.com/crx/blobs/";
+const char* kCrxDownloadUrls[] = {
+ "https://clients2.googleusercontent.com/crx/blobs/",
+ "https://chrome.google.com/webstore/download/"
+};
#endif
// This class encapsulates all the state that is required during construction of
@@ -342,14 +344,16 @@ SupervisedUserURLFilter::GetFilteringBehaviorForURL(
if (extension_urls::GetWebstoreUpdateUrl() == Normalize(effective_url))
return ALLOW;
- // The actual CRX files are downloaded from another URL. Allow that too.
- GURL crx_download_url(kCrxDownloadUrl);
- if (effective_url.SchemeIs(url::kHttpsScheme) &&
- crx_download_url.host_piece() == effective_url.host_piece() &&
- base::StartsWith(effective_url.path_piece(),
- crx_download_url.path_piece(),
- base::CompareCase::SENSITIVE)) {
- return ALLOW;
+ // The actual CRX files are downloaded from other URLs. Allow them too.
+ for (const char* crx_download_url_str : kCrxDownloadUrls) {
+ GURL crx_download_url(crx_download_url_str);
+ if (effective_url.SchemeIs(url::kHttpsScheme) &&
+ crx_download_url.host_piece() == effective_url.host_piece() &&
+ base::StartsWith(effective_url.path_piece(),
+ crx_download_url.path_piece(),
+ base::CompareCase::SENSITIVE)) {
+ return ALLOW;
+ }
}
#endif
« no previous file with comments | « no previous file | chrome/browser/supervised_user/supervised_user_url_filter_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698