0
Commit Graph

4 Commits

Author SHA1 Message Date
ajwong@chromium.org
89590681f8 Disassociate argument type from return type in PostTaskAndReplyWithResult template.
This is needed to  allow the callback system to perform implicit conversions from the task result to the argument's call. Otherwise, the template resolution will force exact equality between the return type of the task and the reply's argument type which is too strict.  For example, you wouldn't be able to take a const int & when returning an int.

Also remove some DCHECKs that can't happen.

BUG=159114


Review URL: https://chromiumcodereview.appspot.com/11369061

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@169825 0039d316-1c4b-4281-b951-d872f2087c98
2012-11-28 03:29:01 +00:00
ajwong@chromium.org
01c86ece02 Remove the rest of #pragma once in one big CL.
For context see this thread:
  https://groups.google.com/a/chromium.org/forum/?fromgroups#!topic/chromium-dev/RMcVNGjB4II

TBR=thakis,pkasting,jam

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@146163 0039d316-1c4b-4281-b951-d872f2087c98
2012-07-11 19:01:43 +00:00
rsleevi@chromium.org
d53e6a6c73 When using PostTaskAndReplyWithResults, if the ResultType is a passed type (eg: scoped_ptr and friends), .Pass() the result to the reply.
Because the temporary storage of the result is an implementation detail of PostTaskAndReplyWithResults, its safe to always assume that passed types should be passed.

BUG=126008
TEST=TaskRunnerHelpersTest.PostTaskAndReplyWithResultPassed


Review URL: http://codereview.chromium.org/10344012

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@135228 0039d316-1c4b-4281-b951-d872f2087c98
2012-05-03 22:34:17 +00:00
battre@chromium.org
95991b1967 Move PostTaskAndReplyWithStatus into task_runner_helpers.h
BUG=TBD
TEST=no


Review URL: http://codereview.chromium.org/9416060

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@132527 0039d316-1c4b-4281-b951-d872f2087c98
2012-04-17 02:48:06 +00:00