Chromium Code Reviews| Index: components/update_client/utils.cc |
| diff --git a/components/update_client/utils.cc b/components/update_client/utils.cc |
| index a76e07329fac74a7c32c71d97fdb4edfd8fe4e9a..caa00cea2073b1cab34ba0dd42df24da940012c4 100644 |
| --- a/components/update_client/utils.cc |
| +++ b/components/update_client/utils.cc |
| @@ -34,6 +34,7 @@ |
| #include "net/url_request/url_fetcher.h" |
| #include "net/url_request/url_request_context_getter.h" |
| #include "net/url_request/url_request_status.h" |
| +#include "url/gurl.h" |
| namespace update_client { |
| @@ -238,4 +239,12 @@ bool IsValidBrand(const std::string& brand) { |
| }) == brand.end(); |
| } |
| +void RemoveUnsecureUrls(std::vector<GURL>* urls) { |
|
waffles
2016/04/04 17:44:44
It might be worth calling this "RemoveEncryptedUrl
Sorin Jianu
2016/04/04 18:01:40
Acknowledged.
|
| + DCHECK(urls); |
| + urls->erase(std::remove_if( |
| + urls->begin(), urls->end(), |
| + [](const GURL& url) { return !url.SchemeIsCryptographic(); }), |
| + urls->end()); |
| +} |
| + |
| } // namespace update_client |