This also updates the mojo ProxyLookupClient interface to include the network error code on failure, as the D-Bus services expects to have this error information.
Bug: 921814
Change-Id: Ic1a240e72cffc7d8d708d150d139f32cfb7d1816
Reviewed-on: https://chromium-review.googlesource.com/c/1419264
Reviewed-by: Steven Bennetts <stevenjb@chromium.org>
Reviewed-by: John Abd-El-Malek <jam@chromium.org>
Reviewed-by: Tom Sepez <tsepez@chromium.org>
Reviewed-by: Robbie McElrath <rmcelrath@chromium.org>
Commit-Queue: Eric Roman <eroman@chromium.org>
Cr-Commit-Position: refs/heads/master@{#624371}
It needs to hold onto a reference to itself until the end of the method,
instead of just until its HasOneRef() check has completed.
Bug: 907524
Change-Id: I75fab97b07fe55f30a6a7c6def390f5d0bc28c4f
Reviewed-on: https://chromium-review.googlesource.com/c/1352684
Commit-Queue: Matt Menke <mmenke@chromium.org>
Reviewed-by: John Abd-El-Malek <jam@chromium.org>
Reviewed-by: Eric Roman <eroman@chromium.org>
Cr-Commit-Position: refs/heads/master@{#611920}
The declarations of move ctors and assigns of
DisjointRangeLockManager::LockRequest, ScopesLockManager::ScopeLock and
ResolveProxyMsgHelper::PendingRequest have `noexcept` specifier, but
their implementations don't. This is OK in C++14, but causes compile
errors in C++17.
This CL adds missing `noexcept` for them.
Bug: 752720
Change-Id: I849f613c63c990afd23c590a9567069b772146d1
Reviewed-on: https://chromium-review.googlesource.com/1175656
Reviewed-by: Kinuko Yasuda <kinuko@chromium.org>
Commit-Queue: Taiju Tsuiki <tzik@chromium.org>
Cr-Commit-Position: refs/heads/master@{#583319}
The class is reference counted, and makes a mojo call, with a callback,
on the UI thread. The callback was passed a raw pointer to the class,
but when it was invoked, it grabbed a reference to the class. When the
class's last reference is released, it posts a delete task to the UI
thread.
So if the class's last reference was released, and then it received a
a Mojo callback, there would be a pending delete task, we'd grab a
new ref (Increasing the refcount from 0 to 1), the delete task would
run, and then a new delete task would be posted when the reference went
to 0 again, resulting in a double-delete.
This CL fixes that by making the class keep a reference to itself
whebever there's a pending mojo callback. MessageFilters are designed
to be able to call Send() after the class they want to send messages
to has been deleted, so the increased lifetime is completely safe.
Bug: 870675
Change-Id: I64f6656e61dc9222a67cd40555d3dd73fb48e208
Reviewed-on: https://chromium-review.googlesource.com/1161967
Commit-Queue: Matt Menke <mmenke@chromium.org>
Reviewed-by: John Abd-El-Malek <jam@chromium.org>
Reviewed-by: Eric Roman <eroman@chromium.org>
Cr-Commit-Position: refs/heads/master@{#580932}
The only code outside of net/ / services/network that does direct proxy
resolutions appears to be the two PPAPI consumers. This CL updates them
both to use the new API.
Bug: 810950
Cq-Include-Trybots: luci.chromium.try:linux_mojo
Change-Id: I643605dfe2d8b67626ea8b84ee793b2c88b66e12
Reviewed-on: https://chromium-review.googlesource.com/1136875
Reviewed-by: Eric Roman <eroman@chromium.org>
Reviewed-by: Tom Sepez <tsepez@chromium.org>
Reviewed-by: Raymes Khoury <raymes@chromium.org>
Reviewed-by: John Abd-El-Malek <jam@chromium.org>
Commit-Queue: Matt Menke <mmenke@chromium.org>
Cr-Commit-Position: refs/heads/master@{#580195}
This CL applies the refactoring tool in //tools/clang/base_bind_rewriters
to //content, that rewrites base::Bind to base::BindOnce where mechanically
doable.
Change-Id: Ibc6e9d7c9e6374c4b9390a20ad4d2333f011f2a7
Reviewed-on: https://chromium-review.googlesource.com/1149773
Commit-Queue: Taiju Tsuiki <tzik@chromium.org>
Reviewed-by: Kinuko Yasuda <kinuko@chromium.org>
Reviewed-by: Kim Paulhamus <kpaulhamus@chromium.org>
Cr-Commit-Position: refs/heads/master@{#578211}
- Greater code organization.
- Promotion of files being "include-what-you-use" clean. Less files now need
to include "net_log.h"; these files are no longer susceptible to having their
includes hidden by the many inner includes of "net_log.h".
- All touched files are also now forward-clean re: NetLog,
NetLogCaptureMode and the new, extracted classes.
Here is the new structuring:
- NetLogSource (net_log_source.h/.cc)
- NetLogEntry, NetLogEntryData (net_log_entry.h/.cc)
- NetLogWithSource (net_log_with_source.h/.cc)
***Did not extract NetLog::ThreadSafeObserver into its own class since
NetLog::ThreadSafeObserver and NetLog are interrelated enough to keep
NetLog::ThreadSafeObserver as an inner class.
Further Notes:
1) On top of scripting, all files were checked manually, ensuring:
- Forwards/including added only when appropriate. No extras added.
- "net_log.h" include removals done correctly. No "net_log.h"-hiding
to occur as a result of new changes.
2) Just as any .cc file will not do the include/forward if the paired .h file
already has the include/forward, *_unittests.cc, *_browsertest.cc and
*_test.cc files exhibit the same behavior when they have a paired .h file.
3) Override methods' types do not add to logic for inserting forwards, since it
is guaranteed that the base class has the forward.
- Saw this done in codebase several times, so making sure to
follow the same rule.
4) A big change was the mass adjustment for the include-hiding of
NetLogCaptureMode by net_log.h includes. Now the NetLogCaptureMode class is
being properly forwarded/included in all files changed by the original
NetLog inner classes extraction work.
5) Many NetLog/NetLogWithSource includes/forwards were added across codebase.
All instances of files seeing their NetLog/NetLogWithSource include/forward
being hidden by their own includes should now be gone. This is to promote
greater flexibility in future changes upon the codebase.
BUG=473710
R=eroman@chromium.org,tfarina@chromium.orgTBR=droger@chromium.org, hirono@chromium.org, rdevlin.cronin@chromium.org, skyostil@chromium.org, wez@chromium.org, juliatuttle@chromium.org, sergeyu@chromium.org, dgozman@chromium.org, hubbe@chromium.org, rdsmith@chromium.org, stevenjb@chromium.org, scheib@chromium.org, bengr@chromium.org, alokp@chromium.org, raymes@chromium.org, samuong@chromium.org, creis@chromium.org, scottbyer@chromium.org, zea@chromium.org, mmenke@chromium.org, eranm@chromium.org
Review-Url: https://codereview.chromium.org/2333923004
Cr-Commit-Position: refs/heads/master@{#422691}
load_flags used to be used in DataReductionProxyDelegate to resolve the
proxy, but it no longer does. load_flags should not be needed to resolve
a proxy for a request.
load_flags was previously used for the CriticalPathBypassFieldTrial:
db1198c532%5E%21/components/data_reduction_proxy/core/browser/data_reduction_proxy_network_delegate.cc
BUG=
Review-Url: https://codereview.chromium.org/2110973002
Cr-Commit-Position: refs/heads/master@{#406112}
POST requests are non-dempotent, so clients using the Data Reduction Proxy (DRP) can often end up at an error page due to the fact that if the DRP has any problems connecting to the origin, DRP and the client will not be safely able to determine if the post successfully made it to the server. The impact of this change on data compression should be very limited, and it will improve the client's experience.
BUG=581750
Review URL: https://codereview.chromium.org/1684123004
Cr-Commit-Position: refs/heads/master@{#379137}
ChannelProxy currently offers messages to all member MessageFilters. It turns
out that a good portion of the most common message types will never be filtered,
making the O(N) filter walk an unnecessary affair. To prevent this, allow
MessageFilters to indicate which (if any) subset of message classes they may
filter, allowing the ChannelProxy to refine the list of filters that are offered
a particular message. This saves ~35us per message received on the browser IO
thread for a typical Android device.
Relanding with a few more guards for MessageFilter removal, access and message
class subscription.
BUG=340881
TBR=asargent@chromium.org
Review URL: https://codereview.chromium.org/142923005
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@253361 0039d316-1c4b-4281-b951-d872f2087c98
ChannelProxy currently offers messages to all member MessageFilters. It turns
out that a good portion of the most common message types will never be filtered,
making the O(N) filter walk an unnecessary affair. To prevent this, allow
MessageFilters to indicate which (if any) subset of message classes they may
filter, allowing the ChannelProxy to refine the list of filters that are offered
a particular message. This saves ~35us per message received on the browser IO
thread for a typical Android device.
BUG=340881
TBR=asargent@chromium.org
Review URL: https://codereview.chromium.org/142923005
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@251622 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
Fixed most of the files found with the following command line:
$ git grep --files-without-match --name-only "namespace content {" -- content/browser/{*.cc,*.h.*.mm}
R=jam@chromium.org
Review URL: https://codereview.chromium.org/11274038
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@164120 0039d316-1c4b-4281-b951-d872f2087c98
Make it private and establish a friend whitelist for existing users.
BUG=64339
TEST=none
Review URL: http://codereview.chromium.org/7438002
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@93200 0039d316-1c4b-4281-b951-d872f2087c98