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

Side by Side Diff: content/browser/geolocation/geolocation_service_context.cc

Issue 1545243002: Convert Pass()→std::move() in //content/browser (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 12 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
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 "content/browser/geolocation/geolocation_service_context.h" 5 #include "content/browser/geolocation/geolocation_service_context.h"
6 6
7 #include <utility>
8
7 namespace content { 9 namespace content {
8 10
9 GeolocationServiceContext::GeolocationServiceContext() : paused_(false) { 11 GeolocationServiceContext::GeolocationServiceContext() : paused_(false) {
10 } 12 }
11 13
12 GeolocationServiceContext::~GeolocationServiceContext() { 14 GeolocationServiceContext::~GeolocationServiceContext() {
13 } 15 }
14 16
15 void GeolocationServiceContext::CreateService( 17 void GeolocationServiceContext::CreateService(
16 const base::Closure& update_callback, 18 const base::Closure& update_callback,
17 mojo::InterfaceRequest<GeolocationService> request) { 19 mojo::InterfaceRequest<GeolocationService> request) {
18 GeolocationServiceImpl* service = 20 GeolocationServiceImpl* service =
19 new GeolocationServiceImpl(request.Pass(), this, update_callback); 21 new GeolocationServiceImpl(std::move(request), this, update_callback);
20 services_.push_back(service); 22 services_.push_back(service);
21 if (geoposition_override_) 23 if (geoposition_override_)
22 service->SetOverride(*geoposition_override_.get()); 24 service->SetOverride(*geoposition_override_.get());
23 else 25 else
24 service->StartListeningForUpdates(); 26 service->StartListeningForUpdates();
25 } 27 }
26 28
27 void GeolocationServiceContext::ServiceHadConnectionError( 29 void GeolocationServiceContext::ServiceHadConnectionError(
28 GeolocationServiceImpl* service) { 30 GeolocationServiceImpl* service) {
29 auto it = std::find(services_.begin(), services_.end(), service); 31 auto it = std::find(services_.begin(), services_.end(), service);
(...skipping 23 matching lines...) Expand all
53 } 55 }
54 } 56 }
55 57
56 void GeolocationServiceContext::ClearOverride() { 58 void GeolocationServiceContext::ClearOverride() {
57 for (auto* service : services_) { 59 for (auto* service : services_) {
58 service->ClearOverride(); 60 service->ClearOverride();
59 } 61 }
60 } 62 }
61 63
62 } // namespace content 64 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/geolocation/geolocation_provider_impl.cc ('k') | content/browser/geolocation/geolocation_service_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698