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

Unified Diff: chrome/browser/chrome_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: Added a TODO 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
« no previous file with comments | « chrome/browser/chrome_content_browser_client.h ('k') | chromecast/browser/cast_content_browser_client.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/chrome_content_browser_client.cc
diff --git a/chrome/browser/chrome_content_browser_client.cc b/chrome/browser/chrome_content_browser_client.cc
index cce6055d14114802396ae3cbd025d6e14eba2cb0..734bd648622910c5b38e8b5d32d85f8c8f7da74b 100644
--- a/chrome/browser/chrome_content_browser_client.cc
+++ b/chrome/browser/chrome_content_browser_client.cc
@@ -627,6 +627,20 @@ class SafeBrowsingSSLCertReporter : public SSLCertReporter {
safe_browsing_ui_manager_;
};
+// A provider of Geolocation services to override AccessTokenStore.
+class ChromeGeolocationDelegate
+ : public content::GeolocationProvider::Delegate {
+ public:
+ ChromeGeolocationDelegate() = default;
+
+ AccessTokenStore* CreateAccessTokenStore() final {
+ return new ChromeAccessTokenStore();
+ }
+
+ private:
+ DISALLOW_COPY_AND_ASSIGN(ChromeGeolocationDelegate);
+};
+
#if BUILDFLAG(ANDROID_JAVA_UI)
void HandleSingleTabModeBlockOnUIThread(const BlockedWindowParams& params) {
WebContents* web_contents = tab_util::GetWebContentsByFrameID(
@@ -2245,8 +2259,9 @@ net::NetLog* ChromeContentBrowserClient::GetNetLog() {
return g_browser_process->net_log();
}
-AccessTokenStore* ChromeContentBrowserClient::CreateAccessTokenStore() {
- return new ChromeAccessTokenStore();
+content::GeolocationProvider::Delegate*
+ChromeContentBrowserClient::CreateGeolocationDelegate() {
+ return new ChromeGeolocationDelegate();
}
bool ChromeContentBrowserClient::IsFastShutdownPossible() {
« no previous file with comments | « chrome/browser/chrome_content_browser_client.h ('k') | chromecast/browser/cast_content_browser_client.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698