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

Issue 1529363006: Introducing SavePackageId and SaveItemId as distinct IdType<...>-based types. (Closed)

Created:
5 years ago by Łukasz Anforowicz
Modified:
4 years, 11 months ago
CC:
asanka, chromium-reviews, darin-cc_chromium.org, jam, loading-reviews_chromium.org, Randy Smith (Not in Mondays), rginda+watch_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Introducing SavePackageId and SaveItemId as distinct IdType<...>-based types. This CL: - Introduces content::IdType<...> template and unit tests. - Uses content::IdType<...> to introduce SavePackageId and SaveItemId. For now id_type.h is in content/common directory - if it proves useful for other things, then we can move it around (see also [1], [2] and [3]). [1] abandoned CL - crrev.com/1496103002: Reusing base::IdType<...> to implement SurfaceId. [2] abandoned CL - crrev.com/1492413002: Adding a compile-time safe base::IdType<...> into //base. [3] Id type discussion at chromium.org / site-isolation-dev list: https://groups.google.com/a/chromium.org/d/topic/site-isolation-dev/4YWsj6keR6s/discussion BUG=565545 Committed: https://crrev.com/1764f5c41e21cf607ffc4d644e077c096a7e78b9 Cr-Commit-Position: refs/heads/master@{#368502}

Patch Set 1 #

Total comments: 6

Patch Set 2 : Addressed CR feedback from Randy. #

Patch Set 3 : Rebasing... #

Total comments: 12

Patch Set 4 : Moved id_type.h to content/common. #

Patch Set 5 : Addressed CR feedback from Nick. #

Patch Set 6 : Self-review. #

Total comments: 4

Patch Set 7 : Introduced IdTypeU32 and IdTypeU64 + tweaked the comments. #

Total comments: 11

Patch Set 8 : It actually builds this time around... :-/ #

Patch Set 9 : Addressed CR feedback from Daniel. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+431 lines, -99 lines) Patch
M content/browser/download/save_file.h View 1 2 1 chunk +1 line, -1 line 0 comments Download
M content/browser/download/save_file_manager.h View 1 2 7 chunks +25 lines, -19 lines 0 comments Download
M content/browser/download/save_file_manager.cc View 1 2 3 4 5 6 7 8 13 chunks +26 lines, -29 lines 0 comments Download
M content/browser/download/save_file_resource_handler.h View 1 2 3 chunks +5 lines, -4 lines 0 comments Download
M content/browser/download/save_file_resource_handler.cc View 1 chunk +2 lines, -2 lines 0 comments Download
M content/browser/download/save_item.h View 1 2 2 chunks +2 lines, -2 lines 0 comments Download
M content/browser/download/save_item.cc View 1 2 1 chunk +3 lines, -3 lines 0 comments Download
M content/browser/download/save_package.h View 1 2 6 chunks +8 lines, -8 lines 0 comments Download
M content/browser/download/save_package.cc View 1 2 11 chunks +17 lines, -16 lines 0 comments Download
M content/browser/download/save_types.h View 1 2 3 4 5 4 chunks +14 lines, -7 lines 0 comments Download
M content/browser/download/save_types.cc View 1 2 2 chunks +4 lines, -4 lines 0 comments Download
M content/browser/loader/resource_dispatcher_host_impl.h View 1 2 2 chunks +3 lines, -2 lines 0 comments Download
M content/browser/loader/resource_dispatcher_host_impl.cc View 1 2 1 chunk +2 lines, -2 lines 0 comments Download
A content/common/id_type.h View 1 2 3 4 5 6 7 8 1 chunk +112 lines, -0 lines 0 comments Download
A content/common/id_type_unittest.cc View 1 2 3 4 5 6 7 8 1 chunk +205 lines, -0 lines 0 comments Download
M content/content_common.gypi View 1 2 3 1 chunk +1 line, -0 lines 0 comments Download
M content/content_tests.gypi View 1 2 3 1 chunk +1 line, -0 lines 0 comments Download

Messages

Total messages: 23 (7 generated)
Łukasz Anforowicz
Asanka, would you be able to review this CL from content/browser/download perspective? This is a ...
5 years ago (2015-12-17 23:47:20 UTC) #2
Randy Smith (Not in Mondays)
content/browser/download LGTM modulo the naming/location issue I raise below. The other two (finding a subtler ...
4 years, 11 months ago (2015-12-29 23:40:17 UTC) #5
Łukasz Anforowicz
Thanks Randy. Nick, can you take a look please? (note the question about location of ...
4 years, 11 months ago (2015-12-30 20:37:23 UTC) #6
ncarter (slow)
https://codereview.chromium.org/1529363006/diff/40001/content/browser/download/id_type.h File content/browser/download/id_type.h (right): https://codereview.chromium.org/1529363006/diff/40001/content/browser/download/id_type.h#newcode6 content/browser/download/id_type.h:6: #define CONTENT_BROWSER_DOWNLOAD_ID_TYPE_H_ Let's put this in content/common for now. ...
4 years, 11 months ago (2016-01-07 00:48:50 UTC) #7
Łukasz Anforowicz
Nick, can you take another look please? https://codereview.chromium.org/1529363006/diff/40001/content/browser/download/id_type.h File content/browser/download/id_type.h (right): https://codereview.chromium.org/1529363006/diff/40001/content/browser/download/id_type.h#newcode6 content/browser/download/id_type.h:6: #define CONTENT_BROWSER_DOWNLOAD_ID_TYPE_H_ ...
4 years, 11 months ago (2016-01-07 18:02:13 UTC) #8
ncarter (slow)
https://codereview.chromium.org/1529363006/diff/40001/content/browser/download/id_type.h File content/browser/download/id_type.h (right): https://codereview.chromium.org/1529363006/diff/40001/content/browser/download/id_type.h#newcode22 content/browser/download/id_type.h:22: // using BarId = content::IdType<Bar, uint64_t, 0>; On 2016/01/07 ...
4 years, 11 months ago (2016-01-07 20:14:32 UTC) #9
Łukasz Anforowicz
Nick, can you take one more look please? https://codereview.chromium.org/1529363006/diff/40001/content/browser/download/id_type.h File content/browser/download/id_type.h (right): https://codereview.chromium.org/1529363006/diff/40001/content/browser/download/id_type.h#newcode22 content/browser/download/id_type.h:22: // ...
4 years, 11 months ago (2016-01-07 21:43:01 UTC) #10
dcheng
A few drive bys. https://codereview.chromium.org/1529363006/diff/120001/content/common/id_type.h File content/common/id_type.h (right): https://codereview.chromium.org/1529363006/diff/120001/content/common/id_type.h#newcode53 content/common/id_type.h:53: bool is_null() const { return ...
4 years, 11 months ago (2016-01-07 22:07:28 UTC) #11
ncarter (slow)
lgtm!!!
4 years, 11 months ago (2016-01-07 22:46:59 UTC) #12
ncarter (slow)
https://codereview.chromium.org/1529363006/diff/120001/content/common/id_type.h File content/common/id_type.h (right): https://codereview.chromium.org/1529363006/diff/120001/content/common/id_type.h#newcode53 content/common/id_type.h:53: bool is_null() const { return value_ == kInvalidValue; } ...
4 years, 11 months ago (2016-01-07 22:49:42 UTC) #13
dcheng
https://codereview.chromium.org/1529363006/diff/120001/content/common/id_type.h File content/common/id_type.h (right): https://codereview.chromium.org/1529363006/diff/120001/content/common/id_type.h#newcode53 content/common/id_type.h:53: bool is_null() const { return value_ == kInvalidValue; } ...
4 years, 11 months ago (2016-01-07 22:50:37 UTC) #14
Łukasz Anforowicz
Thanks for reviewing. https://codereview.chromium.org/1529363006/diff/120001/content/common/id_type.h File content/common/id_type.h (right): https://codereview.chromium.org/1529363006/diff/120001/content/common/id_type.h#newcode53 content/common/id_type.h:53: bool is_null() const { return value_ ...
4 years, 11 months ago (2016-01-07 23:12:43 UTC) #15
Łukasz Anforowicz
FYI - I've pinged [1] cxx@ discussion list and asked them to shout if they ...
4 years, 11 months ago (2016-01-08 23:45:24 UTC) #17
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1529363006/160001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1529363006/160001
4 years, 11 months ago (2016-01-08 23:47:52 UTC) #20
commit-bot: I haz the power
Committed patchset #9 (id:160001)
4 years, 11 months ago (2016-01-09 01:43:02 UTC) #21
commit-bot: I haz the power
4 years, 11 months ago (2016-01-09 01:44:02 UTC) #23
Message was sent while issue was closed.
Patchset 9 (id:??) landed as
https://crrev.com/1764f5c41e21cf607ffc4d644e077c096a7e78b9
Cr-Commit-Position: refs/heads/master@{#368502}

Powered by Google App Engine
This is Rietveld 408576698