Fix crash when CreateAccessTokenStore() is not implemented
commitef0ffb7c3d8532fa50a50ac8d3a4de9e8ef6492f
authorthiago.santos <thiago.santos@intel.com>
Wed, 21 Jan 2015 14:39:25 +0000 (21 06:39 -0800)
committerCommit bot <commit-bot@chromium.org>
Wed, 21 Jan 2015 14:41:44 +0000 (21 14:41 +0000)
tree04f1e3e2cc6e35270c87df63c6f44b663ceb9950
parente97add26342fadfb9be1d5e68a49e3e6eebbfe82
Fix crash when CreateAccessTokenStore() is not implemented

Do not assume that GetAccessTokenStore() - that internally calls
CreateAccessTokenStore() - will always return a valid object because
it will return NULL in case it is not implemented by the embedder
(like currently in app_shell). Also, do not start location providers
if the AccessTokenStore was not created and return
"permission denied" for location requests.

Review URL: https://codereview.chromium.org/795093003

Cr-Commit-Position: refs/heads/master@{#312377}
content/browser/geolocation/location_arbitrator_impl.cc
extensions/shell/app_shell.gyp
extensions/shell/browser/geolocation/geolocation_apitest.cc [new file with mode: 0644]
extensions/test/data/geolocation/always_permission_denied/main.js [new file with mode: 0644]
extensions/test/data/geolocation/always_permission_denied/manifest.json [new file with mode: 0644]