This CL applies //tools/clang/base_bind_rewriter to //chrome, that
removes unneeded base::Passed as a parameter of base::BindOnce.
This doesn't contain any behavior change.
For example, on base::BindOnce call around |Foo|, |ptr|, and |ptr2| below:
void Foo(std::unique_ptr<int>);
std::unique_ptr<int> ptr;
std::unique_ptr<int>* ptr2 = &ptr;
If the parameter of base::Passed() is an rvalue-reference, it just
removes the base::Passed call.
// Before
base::BindOnce([](&Foo, base::Passed(std::move(ptr)));
// After
base::BindOnce([](&Foo, std::move(ptr));
If the parameter is a pointer and its address is taken there, the
rewriter replaces base::Passed and `&` with std::move().
// Before
base::BindOnce(&Foo, base::Passed(&ptr));
// After
base::BindOnce(&Foo, std::move(ptr));
If the parameter is other form of pointer, the rewriter replaces it
with std::move().
// Before
base::BindOnce(&Foo, base::Passed(ptr2));
// After
base::BindOnce(&Foo, std::move(*ptr));
Change-Id: I2f8c1cd7b46143da8e79d0b4e917ba4d585485f2
Reviewed-on: https://chromium-review.googlesource.com/926081
Reviewed-by: Kinuko Yasuda <kinuko@chromium.org>
Commit-Queue: Taiju Tsuiki <tzik@chromium.org>
Cr-Commit-Position: refs/heads/master@{#537763}
These are replaced with the base versions base::circular_deque and base::queue.
Typedefs were replaced with using statements in changed code, and adjacent
typedefs were also converted.
RTCTimestamps struct in rtc_video_encoder.cc was made copyable and moveable
(it's just an int64 and an int32) to support being put in a circular_deque.
BrowsingDataRemoverImpl::RemovalTask was made move-only (from previously
not movable or copyable).
BUG=757232
Cq-Include-Trybots: master.tryserver.chromium.linux:linux_site_isolation
Change-Id: Ib83f929ae4c014ae0d3766a57e9cb56cba446e2b
Reviewed-on: https://chromium-review.googlesource.com/656066
Commit-Queue: Brett Wilson <brettw@chromium.org>
Reviewed-by: Dmitry Gozman <dgozman@chromium.org>
Cr-Commit-Position: refs/heads/master@{#501169}
This CL applies //tools/clang/base_bind_rewriters to //content/browser/{a,b,c,d,f,g}*
It rewrites base::Bind to base::BindOnce where the resulting base::Callback
is immediately converted to base::OnceCallback, which is considered safe
to use base::BindOnce.
E.g.:
base::PostTask(FROM_HERE, base::Bind([]{}));
base::OnceClosure cb = base::Bind([]{});
are converted to:
base::PostTask(FROM_HERE, base::BindOnce([]{}));
base::OnceClosure cb = base::BindOnce([]{});
Change-Id: I11ae9ac169c8e0ff9d9b95452fec22a8b7c91df7
NOPRESUBMIT=true
Change-Id: I11ae9ac169c8e0ff9d9b95452fec22a8b7c91df7
Reviewed-on: https://chromium-review.googlesource.com/628003
Commit-Queue: Taiju Tsuiki <tzik@chromium.org>
Reviewed-by: Kinuko Yasuda <kinuko@chromium.org>
Cr-Commit-Position: refs/heads/master@{#496656}
This patch was automatically generated by applying clang fixit hints
generated by the plugin to the source tree.
BUG=417463
TBR=sky@chromium.org
Review URL: https://codereview.chromium.org/667943003
Cr-Commit-Position: refs/heads/master@{#300469}
This step is a giant search and replace for OVERRIDE and FINAL to
replace them with their lowercase versions.
BUG=417463
Review URL: https://codereview.chromium.org/637183002
Cr-Commit-Position: refs/heads/master@{#298804}
They can be deleted before being used and it's safe to do so.
Review URL: https://codereview.chromium.org/22925003
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@257173 0039d316-1c4b-4281-b951-d872f2087c98
Stream instances report their memory usage to StreamRegistry to get
approval. If rejected, they unregisters themselves.
writer_ and reader_ are cleared immediately when memory usage
violation happens. Added task runner DCHECKs to ByteStreamReaderImpl
and ByteStreamWriterImpl so that we can check we're not violating
thread restriction.
BUG=169957
Review URL: https://chromiumcodereview.appspot.com/22908008
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@218933 0039d316-1c4b-4281-b951-d872f2087c98
- Don't allocate ContentVector if input_contents_size_ is 0
- Remove unused weak_ptr.h and lock.h
- Add comments required by style guide
- Move includes not used in .h to .cc
BUG=
Review URL: https://chromiumcodereview.appspot.com/21839002
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@215958 0039d316-1c4b-4281-b951-d872f2087c98
Change status type to int to make it portable to other component.
After this change, ByteStream could be moved under src/net/base/ or
src/base directory.
- Comment fix (MaybePostToPeer -> Write)
BUG=169957
Review URL: https://chromiumcodereview.appspot.com/18284005
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@215265 0039d316-1c4b-4281-b951-d872f2087c98
To be used by Stream implementation to push received data to
StreamURLRequestJob at arbitrary point.
BUG=169957
Review URL: https://chromiumcodereview.appspot.com/18098004
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@214545 0039d316-1c4b-4281-b951-d872f2087c98
In r174057, ajwong@ added support for implicit testing to scoped_ptr<>. Removes
these in content/.
BUG=232084
Review URL: https://codereview.chromium.org/14081010
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@194608 0039d316-1c4b-4281-b951-d872f2087c98