OLD | NEW |
(Empty) | |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #include "chrome/browser/geolocation/chrome_geolocation_permission_context_facto
ry.h" |
| 6 |
| 7 #include "chrome/common/pref_names.h" |
| 8 #if defined(OS_ANDROID) |
| 9 #include "chrome/browser/geolocation/chrome_geolocation_permission_context_andro
id.h" |
| 10 #else |
| 11 #include "chrome/browser/geolocation/chrome_geolocation_permission_context.h" |
| 12 #endif |
| 13 |
| 14 ChromeGeolocationPermissionContext* |
| 15 ChromeGeolocationPermissionContextFactory::Create(Profile* profile) { |
| 16 #if defined(OS_ANDROID) |
| 17 return new ChromeGeolocationPermissionContextAndroid(profile); |
| 18 #else |
| 19 return new ChromeGeolocationPermissionContext(profile); |
| 20 #endif |
| 21 } |
| 22 |
| 23 void ChromeGeolocationPermissionContextFactory::RegisterUserPrefs( |
| 24 PrefService* user_prefs) { |
| 25 #if defined(OS_ANDROID) |
| 26 user_prefs->RegisterBooleanPref(prefs::kGeolocationEnabled, |
| 27 true, |
| 28 PrefService::UNSYNCABLE_PREF); |
| 29 #endif |
| 30 } |
OLD | NEW |