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

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: 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: 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..974221e80c11bef12ec37d1d51afdbfcd3e85e23 100644
--- a/content/shell/browser/shell_content_browser_client.cc
+++ b/content/shell/browser/shell_content_browser_client.cc
@@ -118,6 +118,20 @@ 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 {
Michael van Ouwerkerk 2016/06/28 11:17:08 nit: DISALLOW_COPY_AND_ASSIGN
mcasas 2016/06/28 16:51:26 Done.
+ public:
+ explicit ShellGeolocationDelegate(ShellBrowserContext* context)
+ : context_(context) {}
+
+ AccessTokenStore* CreateAccessTokenStore() final {
+ return new ShellAccessTokenStore(context_);
+ }
+
+ private:
+ ShellBrowserContext* context_;
+};
+
} // namespace
ShellContentBrowserClient* ShellContentBrowserClient::Get() {
@@ -353,8 +367,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

Powered by Google App Engine
This is Rietveld 408576698