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

Unified Diff: chrome/browser/geolocation/chrome_geolocation_permission_context_factory.cc

Issue 11188020: Introduce Android variants of ChromeGeolocationPermissionContext, GeolocationConfirmInfoBarDelegate (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix build error Created 8 years, 2 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: chrome/browser/geolocation/chrome_geolocation_permission_context_factory.cc
diff --git a/chrome/browser/geolocation/chrome_geolocation_permission_context_factory.cc b/chrome/browser/geolocation/chrome_geolocation_permission_context_factory.cc
new file mode 100644
index 0000000000000000000000000000000000000000..83e274fc83150ac735830da16c6b9f79801dc559
--- /dev/null
+++ b/chrome/browser/geolocation/chrome_geolocation_permission_context_factory.cc
@@ -0,0 +1,30 @@
+// Copyright (c) 2012 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#include "chrome/browser/geolocation/chrome_geolocation_permission_context_factory.h"
+
+#include "chrome/common/pref_names.h"
+#if defined(OS_ANDROID)
+#include "chrome/browser/geolocation/chrome_geolocation_permission_context_android.h"
+#else
+#include "chrome/browser/geolocation/chrome_geolocation_permission_context.h"
+#endif
+
+ChromeGeolocationPermissionContext*
+ ChromeGeolocationPermissionContextFactory::Create(Profile* profile) {
+#if defined(OS_ANDROID)
+ return new ChromeGeolocationPermissionContextAndroid(profile);
+#else
+ return new ChromeGeolocationPermissionContext(profile);
+#endif
+}
+
+void ChromeGeolocationPermissionContextFactory::RegisterUserPrefs(
+ PrefService* user_prefs) {
+#if defined(OS_ANDROID)
+ user_prefs->RegisterBooleanPref(prefs::kGeolocationEnabled,
+ true,
+ PrefService::UNSYNCABLE_PREF);
+#endif
+}

Powered by Google App Engine
This is Rietveld 408576698