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

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

Issue 852593002: Allow overriding GoogleLocationSettingsHelper for tests. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: addressed comments 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/google_location_settings_helper.h" 8 #include "chrome/browser/android/google_location_settings_helper.h"
9 #include "chrome/browser/profiles/profile.h" 9 #include "chrome/browser/profiles/profile.h"
10 #include "content/public/browser/browser_thread.h" 10 #include "content/public/browser/browser_thread.h"
(...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after
91 // back to the UI thread. 91 // back to the UI thread.
92 content::BrowserThread::PostTask( 92 content::BrowserThread::PostTask(
93 content::BrowserThread::UI, FROM_HERE, ui_closure); 93 content::BrowserThread::UI, FROM_HERE, ui_closure);
94 } 94 }
95 95
96 96
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
102 void GeolocationPermissionContextAndroid::
103 SetGoogleLocationSettingsHelperForTesting(
104 scoped_ptr<GoogleLocationSettingsHelper> helper) {
105 google_location_settings_helper_ = helper.Pass();
106 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698