Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2511)

Unified Diff: android_webview/browser/aw_content_browser_client.cc

Issue 2098553002: Geolocation: extract ContentBrowserClient methods specific to Geolocation into a class (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase. Minor touch in LocationArbitratorImplTest to restate previous behaviour. Created 4 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: android_webview/browser/aw_content_browser_client.cc
diff --git a/android_webview/browser/aw_content_browser_client.cc b/android_webview/browser/aw_content_browser_client.cc
index a717f12c64fb5fc5c27e16f6ba7352f6236caedc..4b42c2c818ad19766a2e9635a2e69d394a525749 100644
--- a/android_webview/browser/aw_content_browser_client.cc
+++ b/android_webview/browser/aw_content_browser_client.cc
@@ -160,6 +160,14 @@ class AwAccessTokenStore : public content::AccessTokenStore {
DISALLOW_COPY_AND_ASSIGN(AwAccessTokenStore);
};
+// A provider of Geolocation services to override AccessTokenStore.
+class AwGeolocationDelegate : public content::GeolocationProvider::Delegate {
Michael van Ouwerkerk 2016/06/28 11:17:07 nit: add DISALLOW_COPY_AND_ASSIGN
mcasas 2016/06/28 16:51:25 Done.
+ public:
+ content::AccessTokenStore* CreateAccessTokenStore() final {
+ return new AwAccessTokenStore();
+ }
+};
+
AwLocaleManager* g_locale_manager = NULL;
} // anonymous namespace
@@ -428,8 +436,9 @@ net::NetLog* AwContentBrowserClient::GetNetLog() {
return browser_context_->GetAwURLRequestContext()->GetNetLog();
}
-content::AccessTokenStore* AwContentBrowserClient::CreateAccessTokenStore() {
- return new AwAccessTokenStore();
+content::GeolocationProvider::Delegate*
+AwContentBrowserClient::CreateGeolocationDelegate() {
+ return new AwGeolocationDelegate();
}
bool AwContentBrowserClient::IsFastShutdownPossible() {

Powered by Google App Engine
This is Rietveld 408576698