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