Refactor SharedMemory::Create and fix a rare file leak.
[chromium-blink-merge.git] / chrome / browser / android / mock_location_settings.cc
blob32955aef19cc6f60cf1a76a4e314f4b1e56aea7d
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::IsLocationEnabled() {
31 return IsMasterLocationSettingEnabled() &&
32 IsGoogleAppsLocationSettingEnabled();