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

Side by Side Diff: chromeos/timezone/timezone_provider.cc

Issue 1556773002: Convert Pass()→std::move() in //chromeos (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 11 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 | « chromeos/network/shill_property_util.cc ('k') | chromeos/timezone/timezone_request.cc » ('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 "chromeos/timezone/timezone_provider.h" 5 #include "chromeos/timezone/timezone_provider.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <iterator> 8 #include <iterator>
9 #include <utility>
9 10
10 #include "base/bind.h" 11 #include "base/bind.h"
11 #include "base/logging.h" 12 #include "base/logging.h"
12 #include "chromeos/geolocation/geoposition.h" 13 #include "chromeos/geolocation/geoposition.h"
13 #include "net/url_request/url_request_context_getter.h" 14 #include "net/url_request/url_request_context_getter.h"
14 15
15 namespace chromeos { 16 namespace chromeos {
16 17
17 TimeZoneProvider::TimeZoneProvider( 18 TimeZoneProvider::TimeZoneProvider(
18 net::URLRequestContextGetter* url_context_getter, 19 net::URLRequestContextGetter* url_context_getter,
(...skipping 29 matching lines...) Expand all
48 scoped_ptr<TimeZoneResponseData> timezone, 49 scoped_ptr<TimeZoneResponseData> timezone,
49 bool server_error) { 50 bool server_error) {
50 ScopedVector<TimeZoneRequest>::iterator position = 51 ScopedVector<TimeZoneRequest>::iterator position =
51 std::find(requests_.begin(), requests_.end(), request); 52 std::find(requests_.begin(), requests_.end(), request);
52 DCHECK(position != requests_.end()); 53 DCHECK(position != requests_.end());
53 if (position != requests_.end()) { 54 if (position != requests_.end()) {
54 std::swap(*position, *requests_.rbegin()); 55 std::swap(*position, *requests_.rbegin());
55 requests_.resize(requests_.size() - 1); 56 requests_.resize(requests_.size() - 1);
56 } 57 }
57 58
58 callback.Run(timezone.Pass(), server_error); 59 callback.Run(std::move(timezone), server_error);
59 } 60 }
60 61
61 } // namespace chromeos 62 } // namespace chromeos
OLDNEW
« no previous file with comments | « chromeos/network/shill_property_util.cc ('k') | chromeos/timezone/timezone_request.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698