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

Issue 6507029: Callback API Change: is_null, Reset, and Equals (Closed)

Created:
9 years, 10 months ago by awong
Modified:
9 years, 7 months ago
CC:
chromium-reviews, brettw-cc_chromium.org, Paweł Hajdan Jr.
Visibility:
Public.

Description

Emptiness, Reset, and Comparison API for Callbacks. Since Callback<> is essentially a smartpointer, some introspective APIs are required for sensible usage. BUG=35223 TEST=new unittests Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=75360

Patch Set 1 #

Patch Set 2 : Fix mutable #

Patch Set 3 : grammar #

Total comments: 8

Patch Set 4 : Can we color it "empty()"? #

Patch Set 5 : Can we color it "is_null()"? #

Total comments: 2

Patch Set 6 : rebased #

Unified diffs Side-by-side diffs Delta from patch set Stats (+268 lines, -112 lines) Patch
M base/bind_unittest.cc View 1 chunk +0 lines, -12 lines 0 comments Download
M base/callback.h View 1 2 3 4 13 chunks +122 lines, -80 lines 0 comments Download
M base/callback.h.pump View 1 2 3 4 4 chunks +53 lines, -17 lines 0 comments Download
M base/callback_unittest.cc View 1 2 3 4 3 chunks +93 lines, -3 lines 0 comments Download

Messages

Total messages: 16 (0 generated)
awong
I chose the following 3 function names. I'm not attached to them, and am amenable ...
9 years, 10 months ago (2011-02-17 00:53:34 UTC) #1
darin (slow to review)
As far as naming goes, I only wonder if "is_null" would be better than "is_empty"...
9 years, 10 months ago (2011-02-17 00:59:24 UTC) #2
willchan no longer on Chromium
I'm not going to review the unittest. I'm punting to akalin for that. Thanks Fred ...
9 years, 10 months ago (2011-02-17 01:09:57 UTC) #3
akalin
http://codereview.chromium.org/6507029/diff/3005/base/callback.h File base/callback.h (left): http://codereview.chromium.org/6507029/diff/3005/base/callback.h#oldcode242 base/callback.h:242: invoker_storage_.swap(invoker_holder.invoker_storage_); can't you add an InvokerStorageBase param to the ...
9 years, 10 months ago (2011-02-17 01:16:39 UTC) #4
awong
Went with empty() right now, and lower-cased equals. They were difference conventions cause "reset/is_empty" was ...
9 years, 10 months ago (2011-02-17 02:05:29 UTC) #5
willchan no longer on Chromium
On 2011/02/17 02:05:29, awong wrote: > Went with empty() right now, and lower-cased equals. They ...
9 years, 10 months ago (2011-02-17 02:20:47 UTC) #6
darin (slow to review)
On Wed, Feb 16, 2011 at 6:20 PM, <willchan@chromium.org> wrote: > On 2011/02/17 02:05:29, awong ...
9 years, 10 months ago (2011-02-17 06:46:35 UTC) #7
awong
Current version: Equals() Reset() is_null() Why is_null? I did a coarse search for IsNull() and ...
9 years, 10 months ago (2011-02-17 18:32:54 UTC) #8
awong
is_null() code_search: http://www.google.com/codesearch?hl=en&vert=chromium&lr=&q=file:.\.h+is_null\(+case:yes&sbtn=Search IsNull() code search: http://www.google.com/codesearch?hl=en&vert=chromium&lr=&q=file:.\.h+IsNull\(+case:yes&sbtn=Search On 2011/02/17 18:32:54, awong wrote: > Current version: ...
9 years, 10 months ago (2011-02-17 18:33:37 UTC) #9
darin (slow to review)
sgtm On Thu, Feb 17, 2011 at 10:32 AM, <ajwong@chromium.org> wrote: > Current version: > ...
9 years, 10 months ago (2011-02-17 18:40:31 UTC) #10
akalin
LGTM (I think we all agreed on the function names?) http://codereview.chromium.org/6507029/diff/6002/base/callback_unittest.cc File base/callback_unittest.cc (right): http://codereview.chromium.org/6507029/diff/6002/base/callback_unittest.cc#newcode120 ...
9 years, 10 months ago (2011-02-17 20:29:44 UTC) #11
willchan no longer on Chromium
I'm fine with the names. On Thu, Feb 17, 2011 at 12:29 PM, <akalin@chromium.org> wrote: ...
9 years, 10 months ago (2011-02-17 20:40:21 UTC) #12
awong
http://codereview.chromium.org/6507029/diff/6002/base/callback_unittest.cc File base/callback_unittest.cc (right): http://codereview.chromium.org/6507029/diff/6002/base/callback_unittest.cc#newcode120 base/callback_unittest.cc:120: ASSERT_FALSE(callback_a_.is_null()); On 2011/02/17 20:29:44, akalin wrote: > no need ...
9 years, 10 months ago (2011-02-18 00:42:41 UTC) #13
akalin
On 2011/02/18 00:42:41, awong wrote: > http://codereview.chromium.org/6507029/diff/6002/base/callback_unittest.cc > File base/callback_unittest.cc (right): > > http://codereview.chromium.org/6507029/diff/6002/base/callback_unittest.cc#newcode120 > ...
9 years, 10 months ago (2011-02-18 00:59:20 UTC) #14
awong
On 2011/02/18 00:59:20, akalin wrote: > On 2011/02/18 00:42:41, awong wrote: > > http://codereview.chromium.org/6507029/diff/6002/base/callback_unittest.cc > ...
9 years, 10 months ago (2011-02-18 01:46:08 UTC) #15
awong
9 years, 10 months ago (2011-02-18 01:46:16 UTC) #16
(checking in).

Powered by Google App Engine
This is Rietveld 408576698