Popular sites on the NTP: check that experiment group StartsWith (rather than IS...
[chromium-blink-merge.git] / chrome / browser / android / mock_location_settings.cc
blob350306f4b5c0699ed622e45f4cbc3b73c77d5fc6
1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
5 #include "chrome/browser/android/mock_location_settings.h"
7 bool MockLocationSettings::master_location_enabled = false;
8 bool MockLocationSettings::google_apps_location_enabled = false;
10 MockLocationSettings::MockLocationSettings() : LocationSettings() {
13 MockLocationSettings::~MockLocationSettings() {
16 void MockLocationSettings::SetLocationStatus(
17 bool master, bool google_apps) {
18 master_location_enabled = master;
19 google_apps_location_enabled = google_apps;
22 bool MockLocationSettings::IsGoogleAppsLocationSettingEnabled() {
23 return google_apps_location_enabled;
26 bool MockLocationSettings::IsMasterLocationSettingEnabled() {
27 return master_location_enabled;
30 bool MockLocationSettings::CanSitesRequestLocationPermission(
31 content::WebContents* web_contents) {
32 return IsMasterLocationSettingEnabled() &&
33 IsGoogleAppsLocationSettingEnabled();