This is implementing one side of the mojo Permission service: requesting
a permission. This is being used by the Geolocation code in the renderer
process.
This CL is creating all the required hooks for the permission service
and can be used as a base to increment on top of.
BUG=430238, 420497
Review URL: https://codereview.chromium.org/722153003
Cr-Commit-Position: refs/heads/master@{#304227}
This CL converts the non-permissions-related geolocation IPC to Mojo. The Mojo
GeolocationService interface allows clients to observe location updates. In
//content, the service and its client connect on a per-frame basis, eliminating
the need for the tracking of multiple frames that GeolocationDispatcherHost had
previously been doing. To handle the fact that geolocation updates can be
paused and resumed at per-WebContents granularity, we introduce a
GeolocationServiceContext class, which is used to scope the granularity of
pauses and resumes.
Currently, GeolocationDispatcherHost still handles permissions-related
geolocation IPC. This IPC will be moved to Mojo once there is resolution on
what the right model for handling permissions there is.
BUG=420497
TEST=Go to maps.google.com, allow location tracking, and check that your
location is correctly pinpointed on the map.
Committed: https://crrev.com/28e88081438dc08b06d5f05cfdd980c407db1638
Cr-Commit-Position: refs/heads/master@{#301604}
Review URL: https://codereview.chromium.org/628773003
Cr-Commit-Position: refs/heads/master@{#301824}
Reason for revert:
Made inspector/geolocation-emulation-tests.html layout test crash on all platforms
Flakiness dashboard link:
http://test-results.appspot.com/dashboards/flakiness_dashboard.html#showExpectations=true&tests=inspector%2Fgeolocation-emulation-tests.html
Chromium revisions range:
a772ed62ff..5a5999ebee?pretty=fuller
Original issue's description:
> Partially convert geolocation IPC to Mojo.
>
> This CL converts the non-permissions-related geolocation IPC to Mojo. The Mojo
> GeolocationService interface allows clients to observe location updates. In
> //content, the service and its client connect on a per-frame basis, eliminating
> the need for the tracking of multiple frames that GeolocationDispatcherHost had
> previously been doing. To handle the fact that geolocation updates can be
> paused and resumed at per-WebContents granularity, we introduce a
> GeolocationServiceContext class, which is used to scope the granularity of
> pauses and resumes.
>
> Currently, GeolocationDispatcherHost still handles permissions-related
> geolocation IPC. This IPC will be moved to Mojo once there is resolution on
> what the right model for handling permissions there is.
>
> BUG=420497
> TEST=Go to maps.google.com, allow location tracking, and check that your
> location is correctly pinpointed on the map.
>
> Committed: https://crrev.com/28e88081438dc08b06d5f05cfdd980c407db1638
> Cr-Commit-Position: refs/heads/master@{#301604}
TBR=qsr@chromium.org,mvanouwerkerk@chromium.org,timvolodine@chromium.org,brettw@chromium.org,creis@chromium.org,tsepez@chromium.org,aa@chromium.org,blundell@chromium.org
NOTREECHECKS=true
NOTRY=true
BUG=420497
Review URL: https://codereview.chromium.org/680323002
Cr-Commit-Position: refs/heads/master@{#301629}
This CL converts the non-permissions-related geolocation IPC to Mojo. The Mojo
GeolocationService interface allows clients to observe location updates. In
//content, the service and its client connect on a per-frame basis, eliminating
the need for the tracking of multiple frames that GeolocationDispatcherHost had
previously been doing. To handle the fact that geolocation updates can be
paused and resumed at per-WebContents granularity, we introduce a
GeolocationServiceContext class, which is used to scope the granularity of
pauses and resumes.
Currently, GeolocationDispatcherHost still handles permissions-related
geolocation IPC. This IPC will be moved to Mojo once there is resolution on
what the right model for handling permissions there is.
BUG=420497
TEST=Go to maps.google.com, allow location tracking, and check that your
location is correctly pinpointed on the map.
Review URL: https://codereview.chromium.org/628773003
Cr-Commit-Position: refs/heads/master@{#301604}
The Google C++ style guide states:
Explicitly annotate overrides of virtual functions or virtual
destructors with an override or (less frequently) final specifier.
Older (pre-C++11) code will use the virtual keyword as an inferior
alternative annotation. For clarity, use exactly one of override,
final, or virtual when declaring an override.
To better conform to these guidelines, the following constructs have
been rewritten:
- if a base class has a virtual destructor, then:
virtual ~Foo(); -> ~Foo() override;
- virtual void Foo() override; -> void Foo() override;
- virtual void Foo() override final; -> void Foo() final;
This patch was automatically generated. The clang plugin can generate
fixit hints, which are suggested edits when it is 100% sure it knows how
to fix a problem. The hints from the clang plugin were applied to the
source tree using the tool in https://codereview.chromium.org/598073004.
BUG=417463
R=nasko@chromium.org
Review URL: https://codereview.chromium.org/678073006
Cr-Commit-Position: refs/heads/master@{#301534}
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}
The primary goal of that CL is to be able to assess which IPC
are actually required in order to handle permissions. Cancel
is one of the calls that does not seem needed.
This CL depends on: https://codereview.chromium.org/600043004/
BUG=421085
Review URL: https://codereview.chromium.org/625963003
Cr-Commit-Position: refs/heads/master@{#298736}
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/631053003
Cr-Commit-Position: refs/heads/master@{#298429}
The number of buckets should be one more than currently specified.
Otherwise the histogram buckets the values 3 and 4 in the same bucket.
BUG=
Review URL: https://codereview.chromium.org/547693002
Cr-Commit-Position: refs/heads/master@{#294808}
* No need to pass manager in callback
* No need to keep pointer to manager in provider
* Rename test methods Foo to FooForTesting
Review URL: https://codereview.chromium.org/486203004
Cr-Commit-Position: refs/heads/master@{#291209}
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@291209 0039d316-1c4b-4281-b951-d872f2087c98
* Rename WifiDataProvider to WifiDataProviderManager
* Rename WifiDataProviderImplBase to WifiDataProvider
* Split these into separate files
Review URL: https://codereview.chromium.org/474433003
Cr-Commit-Position: refs/heads/master@{#290586}
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@290586 0039d316-1c4b-4281-b951-d872f2087c98
For consistency with the file names, and with WifiDataProviderLinux and WifiDataProviderChromeOS the platform token is a suffix.
Review URL: https://codereview.chromium.org/476133003
Cr-Commit-Position: refs/heads/master@{#290321}
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@290321 0039d316-1c4b-4281-b951-d872f2087c98
This contains fixes for the following sorts of issues:
* Signedness mismatch
* Assignment inside conditional
* Possibly-uninitialized local variable
This also contains a very small number of other cleanups to nearby code.
BUG=81439
TEST=none
Review URL: https://codereview.chromium.org/373873002
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@283169 0039d316-1c4b-4281-b951-d872f2087c98
This is the model I used for notifications and will use for other features as they move from RenderView to RenderFrame.
BUG=304341
R=avi@chromium.org, mkosiba@chromium.org
Review URL: https://codereview.chromium.org/330143002
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@277038 0039d316-1c4b-4281-b951-d872f2087c98
This broke because of https://src.chromium.org/viewvc/blink?view=rev&revision=175404. There were two problems:
-GeolocationProviderImpl::OnClientsChanged() was incorrectly resetting position_ even when it was overridden for testing. We didn't notice this before because the blink-side geolocation controller would cache the last position and it would reuse it for the iframe. now that each frame goes to the browser, it became apparent
-the test iframe html needed to be non-zero for the same reason as above (now we need to go to the browser for the iframe)
BUG=304341
R=lazyboy@chromium.org
Review URL: https://codereview.chromium.org/311193006
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@275157 0039d316-1c4b-4281-b951-d872f2087c98
This enables permissions bubble policies that rely on user gesture signals for deciding when/how to show bubble UI for permission requests.
BUG=332115
Review URL: https://codereview.chromium.org/185813004
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@262963 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.
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
Make memory returned by MessageReader::PopArrayOfBytes()
const to make it clearer that ownership remains with the
MessageReader.
Also update PopArrayOfStrings() and PopArrayOfObjectPaths()
to clear the passed-in vectors before appending to them.
BUG=none
TBR=isherman@chromium.org,mvanouwerkerk@chromium.org
Review URL: https://codereview.chromium.org/176693003
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@252922 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 doing so:
- Refactor the current LocationProvider such that it doesn't rely on ActivityStatus, updating LocationProviderTest accordingly
- Introduce ContentViewLocationTest.java that verifies the LocationProvider implementation is paused and resumed when the ContentView is hidde/shown
- Introduce a AwGeolocationTest that verifies the LocationProvider implementation is paused and resumed when the new API is invoked
- Introduce LocationProviderFactory and a MockLocationProvider to avoid relying on the system location provider when running tests, as it's not possible to enable mock locations on Android user builds without physical access to the device.
BUG=b/11336074
Review URL: https://codereview.chromium.org/65273002
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@240719 0039d316-1c4b-4281-b951-d872f2087c98
The linux wifi data provider adds an external dependency on libdbus.
This prevents building content_browser on linux systems that don't
include it (particularly embedded ones such as chromecast).
Introduce use_dbus gyp variable and remove this dependency when
use_dbus==0.
BUG=318315,318413
Review URL: https://codereview.chromium.org/59323007
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@234894 0039d316-1c4b-4281-b951-d872f2087c98
The current histogram shows that 46% of the data ends up in the overflow bucket.
Review URL: https://codereview.chromium.org/44343002
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@231095 0039d316-1c4b-4281-b951-d872f2087c98