0
Commit Graph

22 Commits

Author SHA1 Message Date
Avi Drissman
135261e8e2 Update header includes for /base/functional in /r*
bind.h, callback.h, callback_forward.h, and callback_helpers.h
moved into /base/functional/. Update the include paths to
directly include them in their new location.

Bug: 1364441
Change-Id: I7cace513100cdf727d14419cf5817fda92941012
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4157696
Reviewed-by: Daniel Cheng <dcheng@chromium.org>
Commit-Queue: Daniel Cheng <dcheng@chromium.org>
Auto-Submit: Avi Drissman <avi@chromium.org>
Owners-Override: Daniel Cheng <dcheng@chromium.org>
Commit-Queue: Avi Drissman <avi@chromium.org>
Owners-Override: Avi Drissman <avi@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1091527}
2023-01-11 22:43:15 +00:00
Joe Downing
353ba2c7cd Formatting remoting/protocol
Next CL in the chain which formats the files in //remoting with the new
clang-format rules.

Bug: NO_BUG
Change-Id: I8c7af1b39f9da1526a4569cc3d8d18279b220030
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4156531
Reviewed-by: Lambros Lambrou <lambroslambrou@chromium.org>
Commit-Queue: Joe Downing <joedow@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1091519}
2023-01-11 22:37:34 +00:00
Avi Drissman
d6cdf9b877 Update copyright headers in rlz/, remoting/
The methodology used to generate this CL is documented in
https://crbug.com/1098010#c95.

No-Try: true
No-Presubmit: true
Bug: 1098010
Change-Id: Ia865422057bdda8d25f347a651636f6f7f4d4278
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3900694
Owners-Override: Avi Drissman <avi@chromium.org>
Commit-Queue: Avi Drissman <avi@chromium.org>
Reviewed-by: Mark Mentovai <mark@chromium.org>
Auto-Submit: Avi Drissman <avi@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1047637}
2022-09-15 19:52:53 +00:00
Joe Downing
39d710e414 Fixing nested namespace and thread checker macros in //remoting/protocol
Since working in this directory I've noticed that the presubmits will
'fail' if you modify a file with a nested namespace with the suggestion
that you should use the new style (namespace1::namespace2). I'd like to
be able to make quick modifications when needed without also dealing
with namespace formatting so I decided to fix this in a separate CL.

Along the same lines, I noticed that we aren't using the suggested
ThreadChecker macros consistently so I fixed that as well.

This CL also contains a small number of comment reflows and simple
modernization changes. I didn't do this exhaustively but there are a
handful which I noticed while fixing the other problems

No functional changes are expected as a result of these changes.

Change-Id: Ib99429b79fc9a3c55596602e279be8487866660c
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3852429
Commit-Queue: Joe Downing <joedow@chromium.org>
Reviewed-by: Lambros Lambrou <lambroslambrou@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1039396}
2022-08-25 20:11:45 +00:00
Peter Boström
e9178e48b3 Replace DISALLOW_COPY_AND_ASSIGN in remoting/
This replaces DISALLOW_COPY_AND_ASSIGN with explicit constructor deletes
where a local script is able to detect its insertion place (~Foo() is
public => insert before this line).

This is incomplete as not all classes have a public ~Foo() declared, so
not all DISALLOW_COPY_AND_ASSIGN occurrences are replaced.

IWYU cleanup is left as a separate pass that is easier when these macros
go away.

Bug: 1010217
Change-Id: Ibbae02ba444d7308489dfb03c31be23dcfb3c2cb
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3174302
Auto-Submit: Peter Boström <pbos@chromium.org>
Commit-Queue: Daniel Cheng <dcheng@chromium.org>
Reviewed-by: Daniel Cheng <dcheng@chromium.org>
Owners-Override: Daniel Cheng <dcheng@chromium.org>
Cr-Commit-Position: refs/heads/main@{#923948}
2021-09-22 18:11:49 +00:00
danakj
db9ae7941a Rename includes from bind_helpers.h to callback_helpers.h
R=dcheng@chromium.org
NOPRESUBMIT=true
TBR=
NOTRY=true

Change-Id: I93bc6a9360997fae7adeab8c01f56e08fc025dd2
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2523543
Commit-Queue: danakj <danakj@chromium.org>
Reviewed-by: Daniel Cheng <dcheng@chromium.org>
Reviewed-by: danakj <danakj@chromium.org>
Cr-Commit-Position: refs/heads/master@{#826289}
2020-11-11 16:01:35 +00:00
Gabriel Charette
df0a744a81 Reland "Backport some tests in /remoting to SingleThreadTaskEnvironment"
This reverts commit 85d4a0fa5a.

Reason for revert: most likely wrong culprit?

Original change's description:
> Revert "Backport some tests in /remoting to SingleThreadTaskEnvironment"
> 
> This reverts commit afa2cbc718.
> 
> Reason for revert: non_viz_browser_tests failed because of:
> OAuth2Test.SetInvalidTokenStatus
> 
> https://ci.chromium.org/p/chrome/builders/ci/linux-chromeos-google-rel/6325
> 
> Original change's description:
> > Backport some tests in /remoting to SingleThreadTaskEnvironment
> > 
> > These tests were previously migrated from single-threaded MessageLoop to
> > a multi-threaded TaskEnvironment (then named ScopedTaskEnvironment) as
> > part of crbug.com/891670.
> > 
> > //base OWNERS decided in retrospect that it was better to keep a
> > single-threaded option for TaskEnvironment and introduced
> > SingleThreadTaskEnvironment. This CL retrofits that decision for
> > /remoting.
> > 
> > This CL is a no-op if it passes CQ.
> > 
> > This CL was uploaded by git cl split.
> > 
> > R=​jamiewalch@chromium.org
> > 
> > Bug: 891670
> > Change-Id: Id50cc3412d6fbec3e5c71672bf74f6abf0f7332d
> > Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1786679
> > Auto-Submit: Gabriel Charette <gab@chromium.org>
> > Reviewed-by: Lambros Lambrou <lambroslambrou@chromium.org>
> > Commit-Queue: Lambros Lambrou <lambroslambrou@chromium.org>
> > Cr-Commit-Position: refs/heads/master@{#693548}
> 
> TBR=jamiewalch@chromium.org,lambroslambrou@chromium.org,gab@chromium.org
> 
> Change-Id: Ibe96ffa6ddf39371dc64c6ad7236ec366f9331c4
> No-Presubmit: true
> No-Tree-Checks: true
> No-Try: true
> Bug: 891670
> Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1787279
> Reviewed-by: Olga Sharonova <olka@chromium.org>
> Commit-Queue: Olga Sharonova <olka@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#693613}

TBR=jamiewalch@chromium.org,lambroslambrou@chromium.org,gab@chromium.org,olka@chromium.org

Change-Id: Idb489a187fcfb8343079c83f66088c6b6c8b5091
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: 891670
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1787184
Reviewed-by: Gabriel Charette <gab@chromium.org>
Commit-Queue: Gabriel Charette <gab@chromium.org>
Cr-Commit-Position: refs/heads/master@{#693829}
2019-09-05 17:32:35 +00:00
Olga Sharonova
85d4a0fa5a Revert "Backport some tests in /remoting to SingleThreadTaskEnvironment"
This reverts commit afa2cbc718.

Reason for revert: non_viz_browser_tests failed because of:
OAuth2Test.SetInvalidTokenStatus

https://ci.chromium.org/p/chrome/builders/ci/linux-chromeos-google-rel/6325

Original change's description:
> Backport some tests in /remoting to SingleThreadTaskEnvironment
> 
> These tests were previously migrated from single-threaded MessageLoop to
> a multi-threaded TaskEnvironment (then named ScopedTaskEnvironment) as
> part of crbug.com/891670.
> 
> //base OWNERS decided in retrospect that it was better to keep a
> single-threaded option for TaskEnvironment and introduced
> SingleThreadTaskEnvironment. This CL retrofits that decision for
> /remoting.
> 
> This CL is a no-op if it passes CQ.
> 
> This CL was uploaded by git cl split.
> 
> R=​jamiewalch@chromium.org
> 
> Bug: 891670
> Change-Id: Id50cc3412d6fbec3e5c71672bf74f6abf0f7332d
> Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1786679
> Auto-Submit: Gabriel Charette <gab@chromium.org>
> Reviewed-by: Lambros Lambrou <lambroslambrou@chromium.org>
> Commit-Queue: Lambros Lambrou <lambroslambrou@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#693548}

TBR=jamiewalch@chromium.org,lambroslambrou@chromium.org,gab@chromium.org

Change-Id: Ibe96ffa6ddf39371dc64c6ad7236ec366f9331c4
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: 891670
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1787279
Reviewed-by: Olga Sharonova <olka@chromium.org>
Commit-Queue: Olga Sharonova <olka@chromium.org>
Cr-Commit-Position: refs/heads/master@{#693613}
2019-09-05 09:27:40 +00:00
Gabriel Charette
afa2cbc718 Backport some tests in /remoting to SingleThreadTaskEnvironment
These tests were previously migrated from single-threaded MessageLoop to
a multi-threaded TaskEnvironment (then named ScopedTaskEnvironment) as
part of crbug.com/891670.

//base OWNERS decided in retrospect that it was better to keep a
single-threaded option for TaskEnvironment and introduced
SingleThreadTaskEnvironment. This CL retrofits that decision for
/remoting.

This CL is a no-op if it passes CQ.

This CL was uploaded by git cl split.

R=jamiewalch@chromium.org

Bug: 891670
Change-Id: Id50cc3412d6fbec3e5c71672bf74f6abf0f7332d
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1786679
Auto-Submit: Gabriel Charette <gab@chromium.org>
Reviewed-by: Lambros Lambrou <lambroslambrou@chromium.org>
Commit-Queue: Lambros Lambrou <lambroslambrou@chromium.org>
Cr-Commit-Position: refs/heads/master@{#693548}
2019-09-05 07:19:23 +00:00
Gabriel Charette
c710874894 Reland "[TaskEnvironment] Complete migration with header rename"
This is a reland of 18947083c7

The move_source_file.py script's formatting rules incorrectly
formatted services/device/generic_sensor/platform_sensor_and_provider_unittest_win.cc
after all. But we also can't rely 100% on git cl format (crbug.com/997063)
so I ended up performing a git cl format && git add -up
(+interactive addition of missing blank line after foo.h when included
from top of foo.cc)

Also added
$ tools/git/move_source_file.py net/test/test_with_scoped_task_environment.h net/test/test_with_task_environment.h

Original change's description:
> [TaskEnvironment] Complete migration with header rename
>
> This is merely:
>
> $ tools/git/move_source_file.py base/test/scoped_task_environment.h base/test/task_environment.h
> $ tools/git/move_source_file.py base/test/scoped_task_environment.cc base/test/task_environment.cc
> $ tools/git/move_source_file.py base/test/scoped_task_environment_unittest.cc base/test/task_environment_unittest.cc
> $ tools/git/move_source_file.py content/public/test/test_browser_thread_bundle.h content/public/test/browser_task_environment.h
> $ tools/git/move_source_file.py content/public/test/test_browser_thread_bundle.cc content/public/test/browser_task_environment.cc
> $ tools/git/move_source_file.py content/public/test/test_browser_thread_bundle_unittest.cc content/public/test/browser_task_environment_unittest.cc
> $ tools/git/move_source_file.py ios/web/public/test/test_web_thread_bundle.h ios/web/public/test/web_task_environment.h
> $ tools/git/move_source_file.py ios/web/test/test_web_thread_bundle.cc ios/web/test/web_task_environment.cc
>
> and a few manual renames in DEPS files missed by the script
>
> This CL uses --bypass-hooks to avoid having to git cl format because
> many headers are being reordered by git cl format and it's too many to
> figure out in a no-op CL which ones are okay with it.
> windows.h for one should typically be first and another one of the
> reorderings in PS3 even caused a compile failure:
> https://chromium-review.googlesource.com/c/chromium/src/+/1764962/3/components/services/font/font_loader_unittest.cc
>
> TBR=dcheng@chromium.org
>
> Bug: 992483
> Change-Id: I32a4afd43ef779393c95d9873c157be2d3da1dd1
> Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1764962
> Reviewed-by: Gabriel Charette <gab@chromium.org>
> Reviewed-by: Daniel Cheng <dcheng@chromium.org>
> Commit-Queue: Gabriel Charette <gab@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#689778}

TBR=dcheng@chromium.org

Bug: 992483
Change-Id: I6179dd1329a4d30bf5c65450ea893537f31e6f85
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1767658
Reviewed-by: Gabriel Charette <gab@chromium.org>
Commit-Queue: Gabriel Charette <gab@chromium.org>
Cr-Commit-Position: refs/heads/master@{#689794}
2019-08-23 03:31:40 +00:00
Gabriel Charette
b69fcd4f6e Revert "[TaskEnvironment] Complete migration with header rename"
This reverts commit 18947083c7.

Reason for revert: broke Win

Original change's description:
> [TaskEnvironment] Complete migration with header rename
> 
> This is merely:
> 
> $ tools/git/move_source_file.py base/test/scoped_task_environment.h base/test/task_environment.h
> $ tools/git/move_source_file.py base/test/scoped_task_environment.cc base/test/task_environment.cc
> $ tools/git/move_source_file.py base/test/scoped_task_environment_unittest.cc base/test/task_environment_unittest.cc
> $ tools/git/move_source_file.py content/public/test/test_browser_thread_bundle.h content/public/test/browser_task_environment.h
> $ tools/git/move_source_file.py content/public/test/test_browser_thread_bundle.cc content/public/test/browser_task_environment.cc
> $ tools/git/move_source_file.py content/public/test/test_browser_thread_bundle_unittest.cc content/public/test/browser_task_environment_unittest.cc
> $ tools/git/move_source_file.py ios/web/public/test/test_web_thread_bundle.h ios/web/public/test/web_task_environment.h
> $ tools/git/move_source_file.py ios/web/test/test_web_thread_bundle.cc ios/web/test/web_task_environment.cc
> 
> and a few manual renames in DEPS files missed by the script
> 
> This CL uses --bypass-hooks to avoid having to git cl format because
> many headers are being reordered by git cl format and it's too many to
> figure out in a no-op CL which ones are okay with it.
> windows.h for one should typically be first and another one of the
> reorderings in PS3 even caused a compile failure:
> https://chromium-review.googlesource.com/c/chromium/src/+/1764962/3/components/services/font/font_loader_unittest.cc
> 
> TBR=dcheng@chromium.org
> 
> Bug: 992483
> Change-Id: I32a4afd43ef779393c95d9873c157be2d3da1dd1
> Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1764962
> Reviewed-by: Gabriel Charette <gab@chromium.org>
> Reviewed-by: Daniel Cheng <dcheng@chromium.org>
> Commit-Queue: Gabriel Charette <gab@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#689778}

TBR=dcheng@chromium.org,gab@chromium.org

Change-Id: I9aa8ff558d1ff78cebe0c25e559c017578ad4f53
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: 992483
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1767657
Reviewed-by: Gabriel Charette <gab@chromium.org>
Commit-Queue: Gabriel Charette <gab@chromium.org>
Cr-Commit-Position: refs/heads/master@{#689780}
2019-08-23 02:13:29 +00:00
Gabriel Charette
18947083c7 [TaskEnvironment] Complete migration with header rename
This is merely:

$ tools/git/move_source_file.py base/test/scoped_task_environment.h base/test/task_environment.h
$ tools/git/move_source_file.py base/test/scoped_task_environment.cc base/test/task_environment.cc
$ tools/git/move_source_file.py base/test/scoped_task_environment_unittest.cc base/test/task_environment_unittest.cc
$ tools/git/move_source_file.py content/public/test/test_browser_thread_bundle.h content/public/test/browser_task_environment.h
$ tools/git/move_source_file.py content/public/test/test_browser_thread_bundle.cc content/public/test/browser_task_environment.cc
$ tools/git/move_source_file.py content/public/test/test_browser_thread_bundle_unittest.cc content/public/test/browser_task_environment_unittest.cc
$ tools/git/move_source_file.py ios/web/public/test/test_web_thread_bundle.h ios/web/public/test/web_task_environment.h
$ tools/git/move_source_file.py ios/web/test/test_web_thread_bundle.cc ios/web/test/web_task_environment.cc

and a few manual renames in DEPS files missed by the script

This CL uses --bypass-hooks to avoid having to git cl format because
many headers are being reordered by git cl format and it's too many to
figure out in a no-op CL which ones are okay with it.
windows.h for one should typically be first and another one of the
reorderings in PS3 even caused a compile failure:
https://chromium-review.googlesource.com/c/chromium/src/+/1764962/3/components/services/font/font_loader_unittest.cc

TBR=dcheng@chromium.org

Bug: 992483
Change-Id: I32a4afd43ef779393c95d9873c157be2d3da1dd1
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1764962
Reviewed-by: Gabriel Charette <gab@chromium.org>
Reviewed-by: Daniel Cheng <dcheng@chromium.org>
Commit-Queue: Gabriel Charette <gab@chromium.org>
Cr-Commit-Position: refs/heads/master@{#689778}
2019-08-23 02:05:33 +00:00
Gabriel Charette
dfa3604eca [TaskEnvironment] Mass-migrate away from ScopedTaskEnvironment
(second half of
 https://chromium-review.googlesource.com/c/chromium/src/+/1756247)

This is step  of the mass migration. Some of these will be
backported to SingleThreadTaskEnvironment in a later phase.

scoped_task_environment.h will also only move in a follow-up CL.

TBR=dcheng@chromium.org

Bug: 992483
Change-Id: Ie80f083eeeb209180ab3c2884f1b566f73549cc6
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1756248
Reviewed-by: Gabriel Charette <gab@chromium.org>
Reviewed-by: Daniel Cheng <dcheng@chromium.org>
Commit-Queue: Gabriel Charette <gab@chromium.org>
Cr-Commit-Position: refs/heads/master@{#688142}
2019-08-19 17:30:11 +00:00
Jeremy Roman
7c5cfabd6b Use in-class initializers for base::WeakPtrFactory (all remaining uses on Linux desktop).
Changed NULL to nullptr where the presubmit complained (due to new line wrapping).

Generated by: https://chromium-review.googlesource.com/c/chromium/src/+/1689216

Bug: 981415
Tbr: johannes@chromium.org,mathp@chromium.org,satorux@chromium.org
Change-Id: Icd574b69f75ead6dc6f34e7b4edcd52a53830640
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1702744
Reviewed-by: Jeremy Roman <jbroman@chromium.org>
Reviewed-by: Mihai Sardarescu <msarda@chromium.org>
Reviewed-by: Raymes Khoury <raymes@chromium.org>
Reviewed-by: Gabriel Charette <gab@chromium.org>
Reviewed-by: Sergey Ulanov <sergeyu@chromium.org>
Reviewed-by: Yuwei Huang <yuweih@chromium.org>
Reviewed-by: Reilly Grant <reillyg@chromium.org>
Reviewed-by: Ken Rockot <rockot@google.com>
Reviewed-by: Marc Treib <treib@chromium.org>
Reviewed-by: Rayan Kanso <rayankans@chromium.org>
Reviewed-by: Victor Costan <pwnall@chromium.org>
Reviewed-by: Ryo Hashimoto <hashimoto@chromium.org>
Reviewed-by: Tom Sepez <tsepez@chromium.org>
Commit-Queue: Jeremy Roman <jbroman@chromium.org>
Cr-Commit-Position: refs/heads/master@{#686003}
2019-08-12 15:45:27 +00:00
Carlos Caballero
1df57eb2a2 Use ScopedTaskEnvironment instead of MessageLoop
MessageLoop will go away, eventually.

ScopedTaskEnvironment will per default start a ThreadPool, which should
be fine in most of the cases. If you belive your test needs to make sure
that no ThreadPool runs let me know and I will update the patch.

BUG=891670
This CL was uploaded by git cl split.

R=yuweih@chromium.org

Change-Id: Ic007c72adc58a2169301ad9611a21fc28ac849f6
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1636353
Auto-Submit: Carlos Caballero <carlscab@google.com>
Commit-Queue: Yuwei Huang <yuweih@chromium.org>
Reviewed-by: Yuwei Huang <yuweih@chromium.org>
Cr-Commit-Position: refs/heads/master@{#664775}
2019-05-30 17:07:12 +00:00
Erik Jensen
56d7f2e02a Convert MessagePipe::Send callback to OnceClosure.
The done callback will only ever be called once, so it's nicer to
consumers to take a OnceClosure rather than a RepeatingClosure.

The rest is various fallout from that.

Change-Id: Iceabd6a04e1a1307f1806a3aa2765d4f16231263
Reviewed-on: https://chromium-review.googlesource.com/c/1457468
Commit-Queue: Erik Jensen <rkjnsn@chromium.org>
Reviewed-by: Jamie Walch <jamiewalch@chromium.org>
Cr-Commit-Position: refs/heads/master@{#633507}
2019-02-20 01:38:56 +00:00
Alexander Timin
4f9c35c363 [message_loop] Remove message_loop_forward.h
As a final step, replace all includes back:
- mv message_loop_current.h message_loop.h
- s/message_loop_forward.h/message_loop.h/ in all includes.
- s/message_loop_forward.h/message_loop.h/ in base/BUILD.gn
- Remove message_loop_forward.h from third_party/DEPS.

TBR=gab@chromium.org
R=gab@chromium.org
BUG=891670

Change-Id: I623077025701459ddb7045cbcfdad138aa90a9e4
Reviewed-on: https://chromium-review.googlesource.com/c/1313110
Reviewed-by: Alexander Timin <altimin@chromium.org>
Reviewed-by: Gabriel Charette <gab@chromium.org>
Cr-Commit-Position: refs/heads/master@{#604690}
2018-11-01 20:15:20 +00:00
Alexander Timin
c643d0e146 [message_loop] Temporary introduce message_loop_forward.h.
To facilitate splitting MessageLoop into MessageLoop and MessageLoopImpl
introduce message_loop_forward.h and use it everywhere.

- s/message_loop.h/message_loop_forward.h/ in all includes.
- Add message_loop_forward.h to base/BUILD.gn.
- Add message_loop_forward.h to third_party/DEPS.

TBR=gab@chromium.org
BUG=891670

Change-Id: Ibac3a24f5bd4291c9d57dd32c627477e4e6ef324
Reviewed-on: https://chromium-review.googlesource.com/c/1313108
Reviewed-by: Gabriel Charette <gab@chromium.org>
Commit-Queue: Gabriel Charette <gab@chromium.org>
Cr-Commit-Position: refs/heads/master@{#604672}
2018-11-01 19:43:28 +00:00
Peter Kasting
341e1fbe2d Allow base::DoNothing() to handle any argument list.
This changes the form of DoNothing() from a simple no-arg function to a class
that produces callbacks via templated operator().  This allows callers to
replace base::Bind(&base::DoNothing) with base::DoNothing() for a small
boilerplate reduction; more importantly, it allows using DoNothing() to replace
existing no-op functions/lambdas that took more than zero args, and thus had to
be manually declared.  This removes dozens of such functions and around 600 LOC
total.

In a few places, DoNothing() can't be used directly, and this change also adds
explicit callback-generating Once<>() and Repeatedly<>() members that will
produce a callback with a specific signature.

BUG=811554
TEST=none

Cq-Include-Trybots: master.tryserver.blink:linux_trusty_blink_rel;master.tryserver.chromium.android:android_optional_gpu_tests_rel;master.tryserver.chromium.linux:linux_mojo;master.tryserver.chromium.linux:linux_optional_gpu_tests_rel;master.tryserver.chromium.linux:linux_vr;master.tryserver.chromium.mac:ios-simulator-cronet;master.tryserver.chromium.mac:ios-simulator-full-configs;master.tryserver.chromium.mac:mac_optional_gpu_tests_rel;master.tryserver.chromium.win:win_optional_gpu_tests_rel
Change-Id: I37f87b35c6c079a6a8c03ff18ec3a54e1237f126
Reviewed-on: https://chromium-review.googlesource.com/903416
Commit-Queue: Peter Kasting <pkasting@chromium.org>
Reviewed-by: Jochen Eisinger <jochen@chromium.org>
Reviewed-by: Gabriel Charette <gab@chromium.org>
Cr-Commit-Position: refs/heads/master@{#538953}
2018-02-24 00:03:01 +00:00
Peter Kasting
383640f577 Add missing #includes (IWYU).
These were exposed by work to refactor base/bind.h.

BUG=717138
TEST=none
TBR=jochen,rockot,reveman,tzik,rohitrao,jorgelo,satorux,lcwu,gab,mef,irisu,liberato,nicholss

Cq-Include-Trybots: master.tryserver.chromium.android:android_optional_gpu_tests_rel;master.tryserver.chromium.linux:linux_optional_gpu_tests_rel;master.tryserver.chromium.linux:linux_vr;master.tryserver.chromium.mac:ios-simulator-cronet;master.tryserver.chromium.mac:ios-simulator-full-configs;master.tryserver.chromium.mac:mac_optional_gpu_tests_rel;master.tryserver.chromium.win:win_optional_gpu_tests_rel
Change-Id: I901f3d4f9f1791744ce94340df7c2e7389f88a0b
Reviewed-on: https://chromium-review.googlesource.com/914967
Reviewed-by: Peter Kasting <pkasting@chromium.org>
Reviewed-by: Rohit Rao <rohitrao@chromium.org>
Reviewed-by: Taiju Tsuiki <tzik@chromium.org>
Reviewed-by: Joe Downing <joedow@chromium.org>
Commit-Queue: Peter Kasting <pkasting@chromium.org>
Cr-Commit-Position: refs/heads/master@{#536268}
2018-02-13 06:22:40 +00:00
Chris Watkins
6fe52aa20e Run clang-tidy modernize-use-equals-{delete,default} on //remoting
See the bugs and cxx post for justification and details:
https://groups.google.com/a/chromium.org/forum/#!topic/cxx/RkOHzIK6Tq8

This change was done using clang-tidy as described here:
https://chromium.googlesource.com/chromium/src/+/lkcr/docs/clang_tidy.md

In some cases the the tool leaves behind a string of commas where it
replaced a member initializer list
(https://bugs.llvm.org/show_bug.cgi?id=35051). They were cleaned up with:
  git diff --name-only | \
    xargs sed -E -i 's/(^\s*|\)\s*):[ ,]*= default/\1 = default/'

BUG=778959,778957

Change-Id: I3805211c70d2c2340afa4d6d956339d1b25751fc
Reviewed-on: https://chromium-review.googlesource.com/789728
Reviewed-by: Sergey Ulanov <sergeyu@chromium.org>
Commit-Queue: Chris Watkins <watk@chromium.org>
Cr-Commit-Position: refs/heads/master@{#519543}
2017-11-28 03:24:05 +00:00
sergeyu
77b42df81a Move audio decoding to protocol layer
Previously ChromotingClient was responsible for creation of
AudioDecodeScheduler. Moved that logic to IceConnectionToHost because
WebrtcConnectionToHost will not need it. Also moved AudioDecodeScheduler
from remoting/client to remoting/protocol and simplified it.

BUG=638505

Review-Url: https://codereview.chromium.org/2384063004
Cr-Commit-Position: refs/heads/master@{#422671}
2016-10-04 02:11:39 +00:00