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

Unified Diff: content/browser/geolocation/mock_location_arbitrator.cc

Issue 11412194: Cleanup: MockGeolocationArbitrator for GeolocationProvider tests (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Make suggested changes. Created 8 years, 1 month 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: content/browser/geolocation/mock_location_arbitrator.cc
diff --git a/content/browser/geolocation/mock_location_arbitrator.cc b/content/browser/geolocation/mock_location_arbitrator.cc
new file mode 100644
index 0000000000000000000000000000000000000000..a01fe56d9bff1a303c1b62b95890fa5d42922e3d
--- /dev/null
+++ b/content/browser/geolocation/mock_location_arbitrator.cc
@@ -0,0 +1,34 @@
+// Copyright (c) 2012 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 "content/browser/geolocation/mock_location_arbitrator.h"
+
+#include "base/message_loop.h"
+#include "content/public/common/geoposition.h"
+
+namespace content {
+
+MockGeolocationArbitrator::MockGeolocationArbitrator()
+ : permission_granted_(false),
+ providers_started_(false) {
+}
+
+void MockGeolocationArbitrator::StartProviders(
+ const GeolocationObserverOptions& options) {
+ providers_started_ = true;;
+}
+
+void MockGeolocationArbitrator::StopProviders() {
+ providers_started_ = false;
+}
+
+void MockGeolocationArbitrator::OnPermissionGranted() {
+ permission_granted_ = true;
+}
+
+bool MockGeolocationArbitrator::HasPermissionBeenGranted() const {
+ return permission_granted_;
+}
+
+} // namespace content

Powered by Google App Engine
This is Rietveld 408576698