Create separate request context for geolocation service.

* Geolocation service cannot hold reference to browser context,
    since it is destroyed at the end of everything and this will
    confuse the shutdown path of browser context.
  * Geolocation service run on its own thread.
This commit is contained in:
deepak1556 2017-03-14 21:08:10 +05:30
parent a215e8fb82
commit 16f9754445
2 changed files with 40 additions and 50 deletions

View file

@ -9,10 +9,8 @@
namespace atom {
class AtomBrowserContext;
namespace internal {
class TokenLoadingJob;
class GeoURLRequestContextGetter;
}
class AtomAccessTokenStore : public device::AccessTokenStore {
@ -27,9 +25,7 @@ class AtomAccessTokenStore : public device::AccessTokenStore {
const base::string16& access_token) override;
private:
void RunTokenLoadingJob(scoped_refptr<internal::TokenLoadingJob> job);
scoped_refptr<AtomBrowserContext> browser_context_;
scoped_refptr<internal::GeoURLRequestContextGetter> request_context_getter_;
DISALLOW_COPY_AND_ASSIGN(AtomAccessTokenStore);
};