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

Unified Diff: chrome/browser/content_settings/local_shared_objects_container.cc

Issue 1567173002: Show cookies only for HTTP and HTTPS URLs. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Update test expectations. Created 4 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/browser/browsing_data/cookies_tree_model_unittest.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/content_settings/local_shared_objects_container.cc
diff --git a/chrome/browser/content_settings/local_shared_objects_container.cc b/chrome/browser/content_settings/local_shared_objects_container.cc
index 4d3c0903f92fa4aa77dae0e93937e111362416aa..29598c1b1434f1f2517ed6712a3c73696cb84766 100644
--- a/chrome/browser/content_settings/local_shared_objects_container.cc
+++ b/chrome/browser/content_settings/local_shared_objects_container.cc
@@ -75,9 +75,9 @@ size_t LocalSharedObjectsContainer::GetObjectCountForDomain(
size_t count = 0;
// Count all cookies that have the same domain as the provided |origin|. This
- // means count all cookies that has been set by a host that is not considered
- // to be a third party regarding the domain of the provided |origin|.
- // E.g. if the origin is "http://foo.com" then all cookies with domain foo.com,
+ // means count all cookies that have been set by a host that is not considered
+ // to be a third party regarding the domain of the provided |origin|. E.g. if
+ // the origin is "http://foo.com" then all cookies with domain foo.com,
// a.foo.com, b.a.foo.com or *.foo.com will be counted.
typedef CannedBrowsingDataCookieHelper::OriginCookieSetMap OriginCookieSetMap;
const OriginCookieSetMap& origin_cookies_set_map =
@@ -99,7 +99,8 @@ size_t LocalSharedObjectsContainer::GetObjectCountForDomain(
// used as the scheme is ignored by the SameDomainOrHost method.
GURL domain_url(std::string(url::kHttpScheme) +
url::kStandardSchemeSeparator + cookie_domain);
- if (SameDomainOrHost(origin, domain_url))
+
+ if (origin.SchemeIsHTTPOrHTTPS() && SameDomainOrHost(origin, domain_url))
++count;
}
}
« no previous file with comments | « chrome/browser/browsing_data/cookies_tree_model_unittest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698