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

Unified Diff: content/common/geofencing_status.cc

Issue 476293002: Pass through geofencing API calls to the browser process. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase and add region_id sanity check Created 6 years, 2 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: content/common/geofencing_status.cc
diff --git a/content/common/geofencing_status.cc b/content/common/geofencing_status.cc
new file mode 100644
index 0000000000000000000000000000000000000000..b171e497e58894dff63a52e187d62c9958407a2c
--- /dev/null
+++ b/content/common/geofencing_status.cc
@@ -0,0 +1,29 @@
+// Copyright 2014 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/common/geofencing_status.h"
+
+#include "base/logging.h"
+
+namespace content {
+
+const char* GeofencingStatusToString(GeofencingStatus status) {
+ switch (status) {
+ case GEOFENCING_STATUS_OK:
+ return "Operation has succeeded";
+
+ case GEOFENCING_STATUS_OPERATION_FAILED_NO_SERVICE_WORKER:
+ return "Operation failed - no Service Worker";
+
+ case GEOFENCING_STATUS_OPERATION_FAILED_SERVICE_NOT_AVAILABLE:
+ return "Operation failed - geofencing not available";
+
+ case GEOFENCING_STATUS_ERROR:
+ return "Operation has failed (unspecified reason)";
+ }
+ NOTREACHED();
+ return "";
+}
+
+} // namespace content

Powered by Google App Engine
This is Rietveld 408576698