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

Side by Side Diff: device/geolocation/geolocation_service_context.cc

Issue 2851173004: Eliminate bind callback that doesn't take a BindSourceInfo parameter. (Closed)
Patch Set: . Created 3 years, 7 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 unified diff | Download patch
« no previous file with comments | « device/geolocation/geolocation_service_context.h ('k') | device/vr/vr_service_impl.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "device/geolocation/geolocation_service_context.h" 5 #include "device/geolocation/geolocation_service_context.h"
6 6
7 #include <utility> 7 #include <utility>
8 8
9 #include "base/memory/ptr_util.h" 9 #include "base/memory/ptr_util.h"
10 #include "device/geolocation/geolocation_service_impl.h" 10 #include "device/geolocation/geolocation_service_impl.h"
11 11
12 namespace device { 12 namespace device {
13 13
14 GeolocationServiceContext::GeolocationServiceContext() {} 14 GeolocationServiceContext::GeolocationServiceContext() {}
15 15
16 GeolocationServiceContext::~GeolocationServiceContext() {} 16 GeolocationServiceContext::~GeolocationServiceContext() {}
17 17
18 void GeolocationServiceContext::CreateService( 18 void GeolocationServiceContext::CreateService(
19 mojo::InterfaceRequest<mojom::GeolocationService> request) { 19 const service_manager::BindSourceInfo& source_info,
20 mojom::GeolocationServiceRequest request) {
20 GeolocationServiceImpl* service = 21 GeolocationServiceImpl* service =
21 new GeolocationServiceImpl(std::move(request), this); 22 new GeolocationServiceImpl(std::move(request), this);
22 services_.push_back(base::WrapUnique<GeolocationServiceImpl>(service)); 23 services_.push_back(base::WrapUnique<GeolocationServiceImpl>(service));
23 if (geoposition_override_) 24 if (geoposition_override_)
24 service->SetOverride(*geoposition_override_.get()); 25 service->SetOverride(*geoposition_override_.get());
25 else 26 else
26 service->StartListeningForUpdates(); 27 service->StartListeningForUpdates();
27 } 28 }
28 29
29 void GeolocationServiceContext::ServiceHadConnectionError( 30 void GeolocationServiceContext::ServiceHadConnectionError(
(...skipping 15 matching lines...) Expand all
45 } 46 }
46 } 47 }
47 48
48 void GeolocationServiceContext::ClearOverride() { 49 void GeolocationServiceContext::ClearOverride() {
49 for (auto& service : services_) { 50 for (auto& service : services_) {
50 service->ClearOverride(); 51 service->ClearOverride();
51 } 52 }
52 } 53 }
53 54
54 } // namespace device 55 } // namespace device
OLDNEW
« no previous file with comments | « device/geolocation/geolocation_service_context.h ('k') | device/vr/vr_service_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698