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

Unified Diff: content/shell/browser/shell_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 | « content/shell/browser/shell_content_browser_client.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/shell/browser/shell_content_browser_client.cc
diff --git a/content/shell/browser/shell_content_browser_client.cc b/content/shell/browser/shell_content_browser_client.cc
index 9d83b1896d3c8dc26e9204ca16a29a6a07f55881..005e474b698d48f86f4103363cb718f2450e07f0 100644
--- a/content/shell/browser/shell_content_browser_client.cc
+++ b/content/shell/browser/shell_content_browser_client.cc
@@ -118,6 +118,22 @@ int GetCrashSignalFD(const base::CommandLine& command_line) {
}
#endif // defined(OS_POSIX) && !defined(OS_MACOSX) && !defined(OS_ANDROID)
+// A provider of services for Geolocation.
+class ShellGeolocationDelegate : public content::GeolocationProvider::Delegate {
+ public:
+ explicit ShellGeolocationDelegate(ShellBrowserContext* context)
+ : context_(context) {}
+
+ AccessTokenStore* CreateAccessTokenStore() final {
+ return new ShellAccessTokenStore(context_);
+ }
+
+ private:
+ ShellBrowserContext* context_;
+
+ DISALLOW_COPY_AND_ASSIGN(ShellGeolocationDelegate);
+};
+
} // namespace
ShellContentBrowserClient* ShellContentBrowserClient::Get() {
@@ -353,8 +369,9 @@ ShellBrowserContext*
return shell_browser_main_parts_->off_the_record_browser_context();
}
-AccessTokenStore* ShellContentBrowserClient::CreateAccessTokenStore() {
- return new ShellAccessTokenStore(browser_context());
+GeolocationProvider::Delegate*
+ShellContentBrowserClient::CreateGeolocationDelegate() {
+ return new ShellGeolocationDelegate(browser_context());
}
} // namespace content
« no previous file with comments | « content/shell/browser/shell_content_browser_client.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698