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

Issue 2380523004: Avoid unnecessary std::string allocations. (Closed)

Created:
4 years, 2 months ago by pkalinnikov
Modified:
4 years, 2 months ago
Reviewers:
engedy, Peter Kasting
CC:
chromium-reviews, cbentzel+watch_chromium.org
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Avoid unnecessary std::string allocations. When checking SameDomainOrHost, it is unnecessary to allocate std::string's when retrieving DomainAndRegistry from URLs. It is actually unnecessary elsewhere, but this can be addressed in a different CL. BUG=655187 Committed: https://crrev.com/e0a1c1bd1456928a05a582c78210a81f8fe30859 Cr-Commit-Position: refs/heads/master@{#425111}

Patch Set 1 #

Total comments: 5

Patch Set 2 : Correct comment. #

Total comments: 2

Patch Set 3 : Remove function from the header. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+25 lines, -13 lines) Patch
M net/base/registry_controlled_domains/registry_controlled_domain.cc View 1 2 3 chunks +25 lines, -13 lines 0 comments Download

Messages

Total messages: 29 (17 generated)
pkalinnikov
Balazs, can you take a first look?
4 years, 2 months ago (2016-09-28 16:34:17 UTC) #5
engedy
LGTM % comments. Thanks for looking into this! https://codereview.chromium.org/2380523004/diff/1/net/base/registry_controlled_domains/registry_controlled_domain.h File net/base/registry_controlled_domains/registry_controlled_domain.h (right): https://codereview.chromium.org/2380523004/diff/1/net/base/registry_controlled_domains/registry_controlled_domain.h#newcode185 net/base/registry_controlled_domains/registry_controlled_domain.h:185: // ...
4 years, 2 months ago (2016-09-28 17:22:53 UTC) #8
pkalinnikov
https://codereview.chromium.org/2380523004/diff/1/net/base/registry_controlled_domains/registry_controlled_domain.h File net/base/registry_controlled_domains/registry_controlled_domain.h (right): https://codereview.chromium.org/2380523004/diff/1/net/base/registry_controlled_domains/registry_controlled_domain.h#newcode185 net/base/registry_controlled_domains/registry_controlled_domain.h:185: // Same as above, but returns a part of ...
4 years, 2 months ago (2016-10-05 11:51:35 UTC) #9
pkalinnikov
Hi Peter, Can you please review this? Please also advise if I can attach this ...
4 years, 2 months ago (2016-10-05 11:54:34 UTC) #11
engedy
Still LGTM. https://codereview.chromium.org/2380523004/diff/1/net/base/registry_controlled_domains/registry_controlled_domain.h File net/base/registry_controlled_domains/registry_controlled_domain.h (right): https://codereview.chromium.org/2380523004/diff/1/net/base/registry_controlled_domains/registry_controlled_domain.h#newcode186 net/base/registry_controlled_domains/registry_controlled_domain.h:186: // TODO(pkalinnikov): Rename this to GetDomainAndRegistry and ...
4 years, 2 months ago (2016-10-05 11:58:14 UTC) #13
Peter Kasting
LGTM with comment https://codereview.chromium.org/2380523004/diff/20001/net/base/registry_controlled_domains/registry_controlled_domain.cc File net/base/registry_controlled_domains/registry_controlled_domain.cc (right): https://codereview.chromium.org/2380523004/diff/20001/net/base/registry_controlled_domains/registry_controlled_domain.cc#newcode187 net/base/registry_controlled_domains/registry_controlled_domain.cc:187: base::StringPiece GetDomainAndRegistryAsStringPiece( For now, I would ...
4 years, 2 months ago (2016-10-06 06:21:35 UTC) #14
pkalinnikov
https://codereview.chromium.org/2380523004/diff/20001/net/base/registry_controlled_domains/registry_controlled_domain.cc File net/base/registry_controlled_domains/registry_controlled_domain.cc (right): https://codereview.chromium.org/2380523004/diff/20001/net/base/registry_controlled_domains/registry_controlled_domain.cc#newcode187 net/base/registry_controlled_domains/registry_controlled_domain.cc:187: base::StringPiece GetDomainAndRegistryAsStringPiece( On 2016/10/06 06:21:35, Peter Kasting (OOO Oct. ...
4 years, 2 months ago (2016-10-06 10:51:36 UTC) #15
pkalinnikov
Hi Peter, Does this look good? Can I submit?
4 years, 2 months ago (2016-10-13 13:06:28 UTC) #19
Peter Kasting
Yep, LGTM
4 years, 2 months ago (2016-10-13 16:58:58 UTC) #22
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2380523004/40001
4 years, 2 months ago (2016-10-13 18:49:27 UTC) #25
commit-bot: I haz the power
Committed patchset #3 (id:40001)
4 years, 2 months ago (2016-10-13 18:55:32 UTC) #27
commit-bot: I haz the power
4 years, 2 months ago (2016-10-13 18:58:44 UTC) #29
Message was sent while issue was closed.
Patchset 3 (id:??) landed as
https://crrev.com/e0a1c1bd1456928a05a582c78210a81f8fe30859
Cr-Commit-Position: refs/heads/master@{#425111}

Powered by Google App Engine
This is Rietveld 408576698