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/browser/prefs/pref_registry_syncable.h" |
7 #include "chrome/browser/profiles/profile_dependency_manager.h" | 8 #include "chrome/browser/profiles/profile_dependency_manager.h" |
8 #include "chrome/common/pref_names.h" | 9 #include "chrome/common/pref_names.h" |
9 #if defined(OS_ANDROID) | 10 #if defined(OS_ANDROID) |
10 #include "chrome/browser/geolocation/chrome_geolocation_permission_context_andro
id.h" | 11 #include "chrome/browser/geolocation/chrome_geolocation_permission_context_andro
id.h" |
11 #else | 12 #else |
12 #include "chrome/browser/geolocation/chrome_geolocation_permission_context.h" | 13 #include "chrome/browser/geolocation/chrome_geolocation_permission_context.h" |
13 #endif | 14 #endif |
14 | 15 |
15 namespace { | 16 namespace { |
16 | 17 |
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
64 ~ChromeGeolocationPermissionContextFactory() { | 65 ~ChromeGeolocationPermissionContextFactory() { |
65 } | 66 } |
66 | 67 |
67 ProfileKeyedService* | 68 ProfileKeyedService* |
68 ChromeGeolocationPermissionContextFactory::BuildServiceInstanceFor( | 69 ChromeGeolocationPermissionContextFactory::BuildServiceInstanceFor( |
69 Profile* profile) const { | 70 Profile* profile) const { |
70 return new Service(profile); | 71 return new Service(profile); |
71 } | 72 } |
72 | 73 |
73 void ChromeGeolocationPermissionContextFactory::RegisterUserPrefs( | 74 void ChromeGeolocationPermissionContextFactory::RegisterUserPrefs( |
74 PrefServiceSyncable* user_prefs) { | 75 PrefRegistrySyncable* registry) { |
75 #if defined(OS_ANDROID) | 76 #if defined(OS_ANDROID) |
76 user_prefs->RegisterBooleanPref(prefs::kGeolocationEnabled, | 77 registry->RegisterBooleanPref(prefs::kGeolocationEnabled, |
77 true, | 78 true, |
78 PrefServiceSyncable::UNSYNCABLE_PREF); | 79 PrefRegistrySyncable::UNSYNCABLE_PREF); |
79 #endif | 80 #endif |
80 } | 81 } |
81 | 82 |
82 bool ChromeGeolocationPermissionContextFactory:: | 83 bool ChromeGeolocationPermissionContextFactory:: |
83 ServiceRedirectedInIncognito() const { | 84 ServiceRedirectedInIncognito() const { |
84 return true; | 85 return true; |
85 } | 86 } |
OLD | NEW |