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

Side by Side Diff: chrome/browser/geolocation/geolocation_permission_context_factory.cc

Issue 1102733002: Remove most occurences of PrefRegistrySyncable::UNSYNCABLE_PREF (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@prefs-add-reg-funcs
Patch Set: Created 5 years, 8 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 unified diff | Download patch
OLDNEW
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/geolocation_permission_context_factory.h" 5 #include "chrome/browser/geolocation/geolocation_permission_context_factory.h"
6 6
7 #include "chrome/browser/profiles/incognito_helpers.h" 7 #include "chrome/browser/profiles/incognito_helpers.h"
8 #include "chrome/browser/profiles/profile.h" 8 #include "chrome/browser/profiles/profile.h"
9 #include "chrome/common/pref_names.h" 9 #include "chrome/common/pref_names.h"
10 #include "components/keyed_service/content/browser_context_dependency_manager.h" 10 #include "components/keyed_service/content/browser_context_dependency_manager.h"
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
54 return new GeolocationPermissionContext(static_cast<Profile*>(profile)); 54 return new GeolocationPermissionContext(static_cast<Profile*>(profile));
55 #else 55 #else
56 return new GeolocationPermissionContextAndroid( 56 return new GeolocationPermissionContextAndroid(
57 static_cast<Profile*>(profile)); 57 static_cast<Profile*>(profile));
58 #endif 58 #endif
59 } 59 }
60 60
61 void GeolocationPermissionContextFactory::RegisterProfilePrefs( 61 void GeolocationPermissionContextFactory::RegisterProfilePrefs(
62 user_prefs::PrefRegistrySyncable* registry) { 62 user_prefs::PrefRegistrySyncable* registry) {
63 #if defined(OS_ANDROID) 63 #if defined(OS_ANDROID)
64 registry->RegisterBooleanPref( 64 registry->RegisterBooleanPref(prefs::kGeolocationEnabled, true);
65 prefs::kGeolocationEnabled,
66 true,
67 user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF);
68 #endif 65 #endif
69 } 66 }
70 67
71 content::BrowserContext* 68 content::BrowserContext*
72 GeolocationPermissionContextFactory::GetBrowserContextToUse( 69 GeolocationPermissionContextFactory::GetBrowserContextToUse(
73 content::BrowserContext* context) const { 70 content::BrowserContext* context) const {
74 return chrome::GetBrowserContextOwnInstanceInIncognito(context); 71 return chrome::GetBrowserContextOwnInstanceInIncognito(context);
75 } 72 }
OLDNEW
« no previous file with comments | « chrome/browser/font_family_cache_unittest.cc ('k') | chrome/browser/google/google_url_tracker_factory.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698