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

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: Changing to ContentBrowserClient::GetGeolocationServiceOverrides and impl'd in the 6 impl's. Unitte… 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..0e4ab9ac60ac7163c13e0c5368218ce07d19c73b 100644
--- a/android_webview/browser/aw_content_browser_client.cc
+++ b/android_webview/browser/aw_content_browser_client.cc
@@ -160,6 +160,15 @@ class AwAccessTokenStore : public content::AccessTokenStore {
DISALLOW_COPY_AND_ASSIGN(AwAccessTokenStore);
};
+// A provider of Geolocation services to override AccessTokenStore.
+class AwGeolocationServiceOverrides
+ : public content::GeolocationProvider::ServiceOverrides {
+ public:
+ AccessTokenStore* CreateAccessTokenStore() override {
+ return new AwAccessTokenStore();
+ }
+};
+
AwLocaleManager* g_locale_manager = NULL;
} // anonymous namespace
@@ -428,8 +437,9 @@ net::NetLog* AwContentBrowserClient::GetNetLog() {
return browser_context_->GetAwURLRequestContext()->GetNetLog();
}
-content::AccessTokenStore* AwContentBrowserClient::CreateAccessTokenStore() {
- return new AwAccessTokenStore();
+content::GeolocationProvider::ServiceOverrides*
+ AwContentBrowserClient::GetGeolocationServiceOverrides() {
+ return new AwGeolocationServiceOverrides();
Michael van Ouwerkerk 2016/06/24 13:57:18 For a getter, I would expect the client to own the
mcasas 2016/06/24 19:25:52 The easiest way code-wise would be to change it to
}
bool AwContentBrowserClient::IsFastShutdownPossible() {

Powered by Google App Engine
This is Rietveld 408576698