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

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

Issue 850813002: Upstream Site Settings. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@location_settings_singleton
Patch Set: use findbugs annotations; fix test Created 5 years, 11 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 2012 The Chromium Authors. All rights reserved. 1 // Copyright 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_android.h" 5 #include "chrome/browser/geolocation/geolocation_permission_context_android.h"
6 6
7 #include "base/prefs/pref_service.h" 7 #include "base/prefs/pref_service.h"
8 #include "chrome/browser/android/app_google_location_settings_helper.h"
8 #include "chrome/browser/android/google_location_settings_helper.h" 9 #include "chrome/browser/android/google_location_settings_helper.h"
9 #include "chrome/browser/profiles/profile.h" 10 #include "chrome/browser/profiles/profile.h"
10 #include "content/public/browser/browser_thread.h" 11 #include "content/public/browser/browser_thread.h"
11 #include "content/public/browser/web_contents.h" 12 #include "content/public/browser/web_contents.h"
12 13
13 GeolocationPermissionContextAndroid:: 14 GeolocationPermissionContextAndroid::
14 PermissionRequestInfo::PermissionRequestInfo() 15 PermissionRequestInfo::PermissionRequestInfo()
15 : id(0, 0, 0, GURL()), 16 : id(0, 0, 0, GURL()),
16 user_gesture(false) { 17 user_gesture(false) {
17 } 18 }
18 19
19 GeolocationPermissionContextAndroid:: 20 GeolocationPermissionContextAndroid::
20 GeolocationPermissionContextAndroid(Profile* profile) 21 GeolocationPermissionContextAndroid(Profile* profile)
21 : GeolocationPermissionContext(profile), 22 : GeolocationPermissionContext(profile),
22 google_location_settings_helper_( 23 google_location_settings_helper_(new AppGoogleLocationSettingsHelper()),
23 GoogleLocationSettingsHelper::Create()),
24 weak_factory_(this) { 24 weak_factory_(this) {
25 } 25 }
26 26
27 GeolocationPermissionContextAndroid::~GeolocationPermissionContextAndroid() { 27 GeolocationPermissionContextAndroid::~GeolocationPermissionContextAndroid() {
28 } 28 }
29 29
30 void GeolocationPermissionContextAndroid::ProceedDecidePermission( 30 void GeolocationPermissionContextAndroid::ProceedDecidePermission(
31 content::WebContents* web_contents, 31 content::WebContents* web_contents,
32 const PermissionRequestInfo& info, 32 const PermissionRequestInfo& info,
33 base::Callback<void(bool)> callback) { 33 base::Callback<void(bool)> callback) {
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after
97 void GeolocationPermissionContextAndroid::InterceptPermissionCheck( 97 void GeolocationPermissionContextAndroid::InterceptPermissionCheck(
98 const BrowserPermissionCallback& callback, bool granted) { 98 const BrowserPermissionCallback& callback, bool granted) {
99 callback.Run(granted); 99 callback.Run(granted);
100 } 100 }
101 101
102 void GeolocationPermissionContextAndroid:: 102 void GeolocationPermissionContextAndroid::
103 SetGoogleLocationSettingsHelperForTesting( 103 SetGoogleLocationSettingsHelperForTesting(
104 scoped_ptr<GoogleLocationSettingsHelper> helper) { 104 scoped_ptr<GoogleLocationSettingsHelper> helper) {
105 google_location_settings_helper_ = helper.Pass(); 105 google_location_settings_helper_ = helper.Pass();
106 } 106 }
OLDNEW
« no previous file with comments | « chrome/browser/android/preferences/website_preference_bridge.cc ('k') | chrome/chrome_browser.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698