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

Unified Diff: device/geolocation/geolocation_service_context.cc

Issue 2192683003: Revert of Reland: Geolocation: move from content/browser to device/ (patchset #2 id:20001 of https:… (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@2810
Patch Set: Created 4 years, 5 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
« no previous file with comments | « device/geolocation/geolocation_service_context.h ('k') | device/geolocation/geolocation_service_impl.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: device/geolocation/geolocation_service_context.cc
diff --git a/device/geolocation/geolocation_service_context.cc b/device/geolocation/geolocation_service_context.cc
deleted file mode 100644
index 4d7c772e0a004f88af8e03d32a23e83caec91413..0000000000000000000000000000000000000000
--- a/device/geolocation/geolocation_service_context.cc
+++ /dev/null
@@ -1,66 +0,0 @@
-// 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 "device/geolocation/geolocation_service_context.h"
-
-#include <utility>
-
-#include "device/geolocation/geolocation_service_impl.h"
-
-namespace device {
-
-GeolocationServiceContext::GeolocationServiceContext() : paused_(false) {
-}
-
-GeolocationServiceContext::~GeolocationServiceContext() {
-}
-
-void GeolocationServiceContext::CreateService(
- const base::Closure& update_callback,
- mojo::InterfaceRequest<blink::mojom::GeolocationService> request) {
- GeolocationServiceImpl* service =
- new GeolocationServiceImpl(std::move(request), this, update_callback);
- services_.push_back(service);
- if (geoposition_override_)
- service->SetOverride(*geoposition_override_.get());
- else
- service->StartListeningForUpdates();
-}
-
-void GeolocationServiceContext::ServiceHadConnectionError(
- GeolocationServiceImpl* service) {
- auto it = std::find(services_.begin(), services_.end(), service);
- DCHECK(it != services_.end());
- services_.erase(it);
-}
-
-void GeolocationServiceContext::PauseUpdates() {
- paused_ = true;
- for (auto* service : services_) {
- service->PauseUpdates();
- }
-}
-
-void GeolocationServiceContext::ResumeUpdates() {
- paused_ = false;
- for (auto* service : services_) {
- service->ResumeUpdates();
- }
-}
-
-void GeolocationServiceContext::SetOverride(
- std::unique_ptr<Geoposition> geoposition) {
- geoposition_override_.swap(geoposition);
- for (auto* service : services_) {
- service->SetOverride(*geoposition_override_.get());
- }
-}
-
-void GeolocationServiceContext::ClearOverride() {
- for (auto* service : services_) {
- service->ClearOverride();
- }
-}
-
-} // namespace device
« no previous file with comments | « device/geolocation/geolocation_service_context.h ('k') | device/geolocation/geolocation_service_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698