{"push_id":893929951,"size":1,"distinct_size":1,"ref":"refs/heads/master","head":"314d1f44144e9d2a12d41445c9e5a1287e14373c","before":"f981cb2a199f58143449eb64946b5d5e4d974187","commits":[{"sha":"314d1f44144e9d2a12d41445c9e5a1287e14373c","author":{"email":"c86aaa30b07c5d899d1ba3c6956afd8896053056@chromium.org","name":"danakj"},"message":"base: Stop using Pass() on move-only types in Bind and Callback.\n\nThis replaces calls to .Pass() with calls to std::move() instead, which\nwill help allow us to remove the .Pass() method off of our move-only\ntypes.\n\nIt does not dis/allow any new behaviour with Bind and Callback.\nSpecifically:\n\n1. PassedWrapper is created from base::Passed. Previously PassedWrapper\ncalled .Pass() which required a whitelisted type to compile. Now we get\na much nicer error by using enable_if on base::Passed to check that the\ntype is whitelisted:\n\n../../base/callback_unittest.cc:221:66: error: no matching function for call to 'Passed'\n Callback<void(void)> callback = base::Bind(&TakeUniqueByValue, base::Passed(&i));\n                                                                ^~~~~~~~~~~~\n\nThis prevents use such as base::Passed(&a_std_unique_ptr).\n\n2. The CallbackParamTraits specialize on the whitelist, and for non-\nwhitelisted types it will store a T and pass a const T&. The receiving\nmethod will take a T which will try to copy and fail for non-whitelisted\nmove-only types. Secondly, the constructor of BindState will fail as\nBind takes a const T& for each bound argument currently, and the storage\nof T will try to copy into the BindState.\n\nThis prevents use such as base::Bind(&F, std::unique_ptr<T>()), which will\nalso apply to scoped_ptr.\n\nR=Nico, dcheng\nBUG=557422\n\nReview URL: https://codereview.chromium.org/1496403002\n\nCr-Commit-Position: refs/heads/master@{#363635}","distinct":true,"url":"https://api.github.com/repos/dstockwell/chromium/commits/314d1f44144e9d2a12d41445c9e5a1287e14373c"}]}