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

Unified Diff: chrome/browser/android/mock_location_settings.cc

Issue 815343005: Clean up geolocation code now that it's all upstream. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: renamed IsSystemLocationEnabled -> IsLocationEnabled 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/android/mock_location_settings.cc
diff --git a/chrome/browser/android/mock_location_settings.cc b/chrome/browser/android/mock_location_settings.cc
new file mode 100644
index 0000000000000000000000000000000000000000..32955aef19cc6f60cf1a76a4e314f4b1e56aea7d
--- /dev/null
+++ b/chrome/browser/android/mock_location_settings.cc
@@ -0,0 +1,33 @@
+// Copyright 2015 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#include "chrome/browser/android/mock_location_settings.h"
+
+bool MockLocationSettings::master_location_enabled = false;
+bool MockLocationSettings::google_apps_location_enabled = false;
+
+MockLocationSettings::MockLocationSettings() : LocationSettings() {
+}
+
+MockLocationSettings::~MockLocationSettings() {
+}
+
+void MockLocationSettings::SetLocationStatus(
+ bool master, bool google_apps) {
+ master_location_enabled = master;
+ google_apps_location_enabled = google_apps;
+}
+
+bool MockLocationSettings::IsGoogleAppsLocationSettingEnabled() {
+ return google_apps_location_enabled;
+}
+
+bool MockLocationSettings::IsMasterLocationSettingEnabled() {
+ return master_location_enabled;
+}
+
+bool MockLocationSettings::IsLocationEnabled() {
+ return IsMasterLocationSettingEnabled() &&
+ IsGoogleAppsLocationSettingEnabled();
+}
« no previous file with comments | « chrome/browser/android/mock_location_settings.h ('k') | chrome/browser/geolocation/geolocation_permission_context_android.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698