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/profiles/profile_dependency_manager.h" | 7 #include "chrome/browser/profiles/profile_dependency_manager.h" |
8 #include "chrome/common/pref_names.h" | 8 #include "chrome/common/pref_names.h" |
9 #if defined(OS_ANDROID) | 9 #if defined(OS_ANDROID) |
10 #include "chrome/browser/geolocation/chrome_geolocation_permission_context_andro
id.h" | 10 #include "chrome/browser/geolocation/chrome_geolocation_permission_context_andro
id.h" |
(...skipping 10 matching lines...) Expand all Loading... |
21 context_ = new ChromeGeolocationPermissionContextAndroid(profile); | 21 context_ = new ChromeGeolocationPermissionContextAndroid(profile); |
22 #else | 22 #else |
23 context_ = new ChromeGeolocationPermissionContext(profile); | 23 context_ = new ChromeGeolocationPermissionContext(profile); |
24 #endif | 24 #endif |
25 } | 25 } |
26 | 26 |
27 ChromeGeolocationPermissionContext* context() { | 27 ChromeGeolocationPermissionContext* context() { |
28 return context_.get(); | 28 return context_.get(); |
29 } | 29 } |
30 | 30 |
| 31 virtual void Shutdown() OVERRIDE { |
| 32 context()->ShutdownOnUIThread(); |
| 33 } |
| 34 |
31 private: | 35 private: |
32 scoped_refptr<ChromeGeolocationPermissionContext> context_; | 36 scoped_refptr<ChromeGeolocationPermissionContext> context_; |
33 | 37 |
34 DISALLOW_COPY_AND_ASSIGN(Service); | 38 DISALLOW_COPY_AND_ASSIGN(Service); |
35 }; | 39 }; |
36 | 40 |
37 } // namespace | 41 } // namespace |
38 | 42 |
39 // static | 43 // static |
40 ChromeGeolocationPermissionContext* | 44 ChromeGeolocationPermissionContext* |
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
72 user_prefs->RegisterBooleanPref(prefs::kGeolocationEnabled, | 76 user_prefs->RegisterBooleanPref(prefs::kGeolocationEnabled, |
73 true, | 77 true, |
74 PrefServiceSyncable::UNSYNCABLE_PREF); | 78 PrefServiceSyncable::UNSYNCABLE_PREF); |
75 #endif | 79 #endif |
76 } | 80 } |
77 | 81 |
78 bool ChromeGeolocationPermissionContextFactory:: | 82 bool ChromeGeolocationPermissionContextFactory:: |
79 ServiceRedirectedInIncognito() const { | 83 ServiceRedirectedInIncognito() const { |
80 return true; | 84 return true; |
81 } | 85 } |
OLD | NEW |