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

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

Issue 2411673002: Whitelisting one more crx download url (Closed)
Patch Set: response to code review 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 c9a7d023be15f8de54a39a5486c988638ea5fc3f..f27f857ab1bd255fa14384013033d91aa1b56deb 100644
--- a/chrome/browser/supervised_user/supervised_user_url_filter.cc
+++ b/chrome/browser/supervised_user/supervised_user_url_filter.cc
@@ -93,8 +93,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
@@ -354,14 +356,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