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

Issue 1336763006: cc: Switch ListContainer to use composition instead of inheritance. (Closed)

Created:
5 years, 3 months ago by vmpstr
Modified:
5 years, 3 months ago
Reviewers:
danakj, weiliangc
CC:
cc-bugs_chromium.org, chromium-reviews
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

cc: Switch ListContainer to use composition instead of inheritance. This patch switches ListContainer to be a non-derived type, and instead uses the base (which is renamed to helper) as a member. This allows us to add other ListContainer-like types without the worry that they will be somehow passed around as base classes. R=danakj, weiliangc CQ_INCLUDE_TRYBOTS=tryserver.blink:linux_blink_rel Committed: https://crrev.com/988b5dee7b043fb1ae72bd64aac5b278f91b4146 Cr-Commit-Position: refs/heads/master@{#348925}

Patch Set 1 #

Patch Set 2 : #

Total comments: 2

Patch Set 3 : #

Total comments: 5

Patch Set 4 : rebase #

Patch Set 5 : multiple files #

Unified diffs Side-by-side diffs Delta from patch set Stats (+354 lines, -931 lines) Patch
M cc/base/BUILD.gn View 1 2 3 4 1 chunk +2 lines, -1 line 0 comments Download
M cc/base/list_container.h View 1 2 3 4 12 chunks +75 lines, -232 lines 0 comments Download
M cc/base/list_container.cc View 1 2 3 4 1 chunk +0 lines, -576 lines 0 comments Download
A cc/base/list_container_helper.h View 1 2 3 4 1 chunk +175 lines, -0 lines 0 comments Download
A + cc/base/list_container_helper.cc View 1 2 3 4 19 chunks +100 lines, -121 lines 0 comments Download
M cc/cc.gyp View 1 2 3 4 1 chunk +2 lines, -1 line 0 comments Download

Messages

Total messages: 15 (2 generated)
vmpstr
Please take a look.
5 years, 3 months ago (2015-09-11 20:34:48 UTC) #1
weiliangc
Like the idea of composition instead of inheritance. Not too sure about friend class. https://codereview.chromium.org/1336763006/diff/20001/cc/base/list_container.h ...
5 years, 3 months ago (2015-09-14 19:57:13 UTC) #2
vmpstr
https://codereview.chromium.org/1336763006/diff/20001/cc/base/list_container.h File cc/base/list_container.h (right): https://codereview.chromium.org/1336763006/diff/20001/cc/base/list_container.h#newcode30 cc/base/list_container.h:30: friend class CC_EXPORT ListContainer; On 2015/09/14 19:57:13, weiliangc wrote: ...
5 years, 3 months ago (2015-09-14 20:05:07 UTC) #3
hendrikw
On 2015/09/14 20:05:07, vmpstr wrote: > https://codereview.chromium.org/1336763006/diff/20001/cc/base/list_container.h > File cc/base/list_container.h (right): > > https://codereview.chromium.org/1336763006/diff/20001/cc/base/list_container.h#newcode30 > ...
5 years, 3 months ago (2015-09-14 20:10:02 UTC) #4
weiliangc
LGTM :) On 2015/09/14 at 20:10:02, hendrikw wrote: > On 2015/09/14 20:05:07, vmpstr wrote: > ...
5 years, 3 months ago (2015-09-14 21:17:14 UTC) #5
weiliangc
On 2015/09/14 at 21:17:14, weiliangc wrote: > LGTM :) > > On 2015/09/14 at 20:10:02, ...
5 years, 3 months ago (2015-09-14 21:17:56 UTC) #6
danakj
LGTM https://codereview.chromium.org/1336763006/diff/40001/cc/base/list_container.h File cc/base/list_container.h (right): https://codereview.chromium.org/1336763006/diff/40001/cc/base/list_container.h#newcode188 cc/base/list_container.h:188: class CC_EXPORT ListContainer { can you put this ...
5 years, 3 months ago (2015-09-14 21:25:59 UTC) #7
vmpstr
https://codereview.chromium.org/1336763006/diff/40001/cc/base/list_container.h File cc/base/list_container.h (right): https://codereview.chromium.org/1336763006/diff/40001/cc/base/list_container.h#newcode188 cc/base/list_container.h:188: class CC_EXPORT ListContainer { On 2015/09/14 21:25:59, danakj wrote: ...
5 years, 3 months ago (2015-09-15 17:32:33 UTC) #8
danakj
Thanks :)
5 years, 3 months ago (2015-09-15 17:33:32 UTC) #9
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1336763006/80001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1336763006/80001
5 years, 3 months ago (2015-09-15 17:34:17 UTC) #12
commit-bot: I haz the power
Committed patchset #5 (id:80001)
5 years, 3 months ago (2015-09-15 17:44:21 UTC) #13
commit-bot: I haz the power
Patchset 5 (id:??) landed as https://crrev.com/988b5dee7b043fb1ae72bd64aac5b278f91b4146 Cr-Commit-Position: refs/heads/master@{#348925}
5 years, 3 months ago (2015-09-15 17:44:57 UTC) #14
commit-bot: I haz the power
5 years, 3 months ago (2015-09-23 12:46:35 UTC) #15
Message was sent while issue was closed.
Patchset 5 (id:??) landed as
https://crrev.com/988b5dee7b043fb1ae72bd64aac5b278f91b4146
Cr-Commit-Position: refs/heads/master@{#348925}

Powered by Google App Engine
This is Rietveld 408576698