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

Issue 2612313003: Optimize SameDomainOrHost via a fast-fail path

Created:
3 years, 11 months ago by ncarter (slow)
Modified:
3 years, 11 months ago
Reviewers:
Ryan Sleevi
CC:
chromium-reviews, cbentzel+watch_chromium.org, Ryan Sleevi
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Optimize SameDomainOrHost via a fast-fail path BUG=678351

Patch Set 1 #

Total comments: 1
Unified diffs Side-by-side diffs Delta from patch set Stats (+21 lines, -4 lines) Patch
M net/base/registry_controlled_domains/registry_controlled_domain.cc View 1 chunk +21 lines, -4 lines 1 comment Download

Messages

Total messages: 7 (6 generated)
Ryan Sleevi
3 years, 11 months ago (2017-01-06 00:38:16 UTC) #5
https://codereview.chromium.org/2612313003/diff/1/net/base/registry_controlle...
File net/base/registry_controlled_domains/registry_controlled_domain.cc (right):

https://codereview.chromium.org/2612313003/diff/1/net/base/registry_controlle...
net/base/registry_controlled_domains/registry_controlled_domain.cc:336: if
(!base::EndsWith(host2, domain1, base::CompareCase::SENSITIVE))
Unclear if you're doing sensitive as an optimization (to force a memcmp vs a
normalization), but the comparison here would be case-insensitive.

However, both |host1| and |host2| should have already been normalized
(punycoded, lowercased, dot stripped) in order to get the domain, so you should
be fine.

Powered by Google App Engine
This is Rietveld 408576698