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

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

Issue 13548003: Prevent leaking geolocation permission from Incognito (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 7 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/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 #include "components/user_prefs/pref_registry_syncable.h" 9 #include "components/user_prefs/pref_registry_syncable.h"
10 #if defined(OS_ANDROID) 10 #if defined(OS_ANDROID)
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after
75 PrefRegistrySyncable* registry) { 75 PrefRegistrySyncable* registry) {
76 #if defined(OS_ANDROID) 76 #if defined(OS_ANDROID)
77 registry->RegisterBooleanPref(prefs::kGeolocationEnabled, 77 registry->RegisterBooleanPref(prefs::kGeolocationEnabled,
78 true, 78 true,
79 PrefRegistrySyncable::UNSYNCABLE_PREF); 79 PrefRegistrySyncable::UNSYNCABLE_PREF);
80 #endif 80 #endif
81 } 81 }
82 82
83 bool ChromeGeolocationPermissionContextFactory:: 83 bool ChromeGeolocationPermissionContextFactory::
84 ServiceRedirectedInIncognito() const { 84 ServiceRedirectedInIncognito() const {
85 return false;
86 }
87
88 bool ChromeGeolocationPermissionContextFactory::
89 ServiceHasOwnInstanceInIncognito() const {
85 return true; 90 return true;
86 } 91 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698