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

Side by Side Diff: content/browser/geolocation/geolocation_service_impl.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_impl.h" 5 #include "content/browser/geolocation/geolocation_service_impl.h"
6 6
7 #include <utility>
8
7 #include "base/bind.h" 9 #include "base/bind.h"
8 #include "base/metrics/histogram.h" 10 #include "base/metrics/histogram.h"
9 #include "content/browser/geolocation/geolocation_service_context.h" 11 #include "content/browser/geolocation/geolocation_service_context.h"
10 #include "content/public/common/mojo_geoposition.mojom.h" 12 #include "content/public/common/mojo_geoposition.mojom.h"
11 13
12 namespace content { 14 namespace content {
13 15
14 namespace { 16 namespace {
15 17
16 // Geoposition error codes for reporting in UMA. 18 // Geoposition error codes for reporting in UMA.
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
55 code, 57 code,
56 GEOPOSITION_ERROR_CODE_COUNT); 58 GEOPOSITION_ERROR_CODE_COUNT);
57 } 59 }
58 60
59 } // namespace 61 } // namespace
60 62
61 GeolocationServiceImpl::GeolocationServiceImpl( 63 GeolocationServiceImpl::GeolocationServiceImpl(
62 mojo::InterfaceRequest<GeolocationService> request, 64 mojo::InterfaceRequest<GeolocationService> request,
63 GeolocationServiceContext* context, 65 GeolocationServiceContext* context,
64 const base::Closure& update_callback) 66 const base::Closure& update_callback)
65 : binding_(this, request.Pass()), 67 : binding_(this, std::move(request)),
66 context_(context), 68 context_(context),
67 update_callback_(update_callback), 69 update_callback_(update_callback),
68 high_accuracy_(false), 70 high_accuracy_(false),
69 has_position_to_report_(false) { 71 has_position_to_report_(false) {
70 DCHECK(context_); 72 DCHECK(context_);
71 binding_.set_connection_error_handler( 73 binding_.set_connection_error_handler(
72 base::Bind(&GeolocationServiceImpl::OnConnectionError, 74 base::Bind(&GeolocationServiceImpl::OnConnectionError,
73 base::Unretained(this))); 75 base::Unretained(this)));
74 } 76 }
75 77
(...skipping 109 matching lines...) Expand 10 before | Expand all | Expand 10 after
185 ReportCurrentPosition(); 187 ReportCurrentPosition();
186 } 188 }
187 189
188 void GeolocationServiceImpl::ReportCurrentPosition() { 190 void GeolocationServiceImpl::ReportCurrentPosition() {
189 position_callback_.Run(current_position_.Clone()); 191 position_callback_.Run(current_position_.Clone());
190 position_callback_.reset(); 192 position_callback_.reset();
191 has_position_to_report_ = false; 193 has_position_to_report_ = false;
192 } 194 }
193 195
194 } // namespace content 196 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/geolocation/geolocation_service_context.cc ('k') | content/browser/geolocation/wifi_data_provider_linux.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698