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

Issue 2781263002: Some C++11 cleanup of history types. (Closed)

Created:
3 years, 8 months ago by brettw
Modified:
3 years, 8 months ago
Reviewers:
Gang Wu
CC:
chromium-reviews
Target Ref:
refs/heads/master
Project:
chromium
Visibility:
Public.

Description

Some C++11 cleanup of history types. History has a lot of vectors of structs that include things like URLs and strings that could benefit from move constructors. This implements move constructors on such classes in history_types.h. Moves initialization of many values from explicit constructor initializer lists to the class definition for clarity and de-duplication. For URLRow this allowed removing the Initialize() helper function. Some structs were using implicitly defined copy and assignment operators. These are defined now so they can be out-of-line for code bloat reasons. An unused constructor on URLResult is removed. Out-of-date references to dirty bits in comments in URLRow are removed. These dirty bits no longer exist. Friend declarations in URLRow (these were related to handling of the aforementioned dirty bits) were removed and two places depending on these friend declarations were changed to use set_*() functions instead. A set_url() function was added which was the only missing setter. Review-Url: https://codereview.chromium.org/2781263002 Cr-Commit-Position: refs/heads/master@{#461159} Committed: https://chromium.googlesource.com/chromium/src/+/57694b362cc73fb681e98a5af85990261a9a2a88

Patch Set 1 #

Patch Set 2 : . #

Patch Set 3 : Fix #

Patch Set 4 : Fix Android #

Unified diffs Side-by-side diffs Delta from patch set Stats (+127 lines, -164 lines) Patch
M components/history/core/browser/history_backend.cc View 1 2 3 1 chunk +1 line, -1 line 0 comments Download
M components/history/core/browser/history_types.h View 1 2 16 chunks +39 lines, -31 lines 0 comments Download
M components/history/core/browser/history_types.cc View 1 2 3 7 chunks +32 lines, -50 lines 0 comments Download
M components/history/core/browser/url_database.cc View 1 2 3 1 chunk +7 lines, -7 lines 0 comments Download
M components/history/core/browser/url_row.h View 1 2 3 8 chunks +11 lines, -29 lines 0 comments Download
M components/history/core/browser/url_row.cc View 1 2 3 2 chunks +27 lines, -46 lines 0 comments Download
M components/query_parser/snippet.h View 1 chunk +3 lines, -0 lines 0 comments Download
M components/query_parser/snippet.cc View 1 2 3 1 chunk +7 lines, -0 lines 0 comments Download

Messages

Total messages: 25 (18 generated)
brettw
.
3 years, 8 months ago (2017-03-30 05:21:25 UTC) #2
brettw
Fix
3 years, 8 months ago (2017-03-30 16:33:35 UTC) #7
brettw
3 years, 8 months ago (2017-03-30 16:45:30 UTC) #11
brettw
Fix Android
3 years, 8 months ago (2017-03-30 19:52:18 UTC) #15
Gang Wu
lgtm
3 years, 8 months ago (2017-03-31 17:12:12 UTC) #20
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/2781263002/60001
3 years, 8 months ago (2017-03-31 17:13:13 UTC) #22
commit-bot: I haz the power
3 years, 8 months ago (2017-03-31 17:24:41 UTC) #25
Message was sent while issue was closed.
Committed patchset #4 (id:60001) as
https://chromium.googlesource.com/chromium/src/+/57694b362cc73fb681e98a5af859...

Powered by Google App Engine
This is Rietveld 408576698