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

Issue 10692147: Add quick reference for bind/callback usage. (Closed)

Created:
8 years, 5 months ago by brettw
Modified:
8 years, 5 months ago
Reviewers:
awong
CC:
chromium-reviews, erikwright (departed), brettw-cc_chromium.org
Visibility:
Public.

Description

Add quick reference for bind/callback usage. Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=146425

Patch Set 1 #

Total comments: 9

Patch Set 2 : #

Unified diffs Side-by-side diffs Delta from patch set Stats (+406 lines, -144 lines) Patch
M base/bind.h View 1 1 chunk +16 lines, -5 lines 0 comments Download
M base/bind.h.pump View 1 1 chunk +16 lines, -5 lines 0 comments Download
M base/bind_internal.h View 1 chunk +3 lines, -0 lines 0 comments Download
M base/bind_internal.h.pump View 1 chunk +3 lines, -0 lines 0 comments Download
M base/callback.h View 1 2 chunks +184 lines, -67 lines 0 comments Download
M base/callback.h.pump View 1 2 chunks +184 lines, -67 lines 0 comments Download

Messages

Total messages: 4 (0 generated)
brettw
https://chromiumcodereview.appspot.com/10692147/diff/1/base/callback.h File base/callback.h (right): https://chromiumcodereview.appspot.com/10692147/diff/1/base/callback.h#newcode74 base/callback.h:74: // RUNNING A CALLBACK This section is new since ...
8 years, 5 months ago (2012-07-10 23:51:38 UTC) #1
awong
couple of small nits. https://chromiumcodereview.appspot.com/10692147/diff/1/base/bind.h File base/bind.h (right): https://chromiumcodereview.appspot.com/10692147/diff/1/base/bind.h#newcode18 base/bind.h:18: // User documentation What about ...
8 years, 5 months ago (2012-07-11 00:04:17 UTC) #2
brettw
new snap up. https://chromiumcodereview.appspot.com/10692147/diff/1/base/callback.h File base/callback.h (right): https://chromiumcodereview.appspot.com/10692147/diff/1/base/callback.h#newcode169 base/callback.h:169: // base::Callback cb = base::Bind(base::IgnoreResult(&DoSomething)); I ...
8 years, 5 months ago (2012-07-11 17:23:24 UTC) #3
awong
8 years, 5 months ago (2012-07-11 18:07:43 UTC) #4
LGTM

Serious thanks for doing this!  I know lots of people have wanted better docs
for a while.

https://chromiumcodereview.appspot.com/10692147/diff/1/base/callback.h
File base/callback.h (right):

https://chromiumcodereview.appspot.com/10692147/diff/1/base/callback.h#newcod...
base/callback.h:169: //   base::Callback cb =
base::Bind(base::IgnoreResult(&DoSomething));
On 2012/07/11 17:23:24, brettw wrote:
> I changed this to Callback<void(int)> which I think is correct.

Ah yes...that is the correct one.

https://chromiumcodereview.appspot.com/10692147/diff/1/base/callback.h#newcod...
base/callback.h:193: //   // f becomes null during this call.
On 2012/07/11 17:23:24, brettw wrote:
> I think your suggestion doesn't really feel like it fits in the quick
reference
> to me, and if you understand Passed it should be clear. Plus it will probably
> crash when you run it and then you'll fix your code :)

SGTM

Powered by Google App Engine
This is Rietveld 408576698