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

Side by Side Diff: chrome/browser/extensions/api/signed_in_devices/id_mapping_helper.cc

Issue 1549233002: Convert Pass()→std::move() in //chrome/browser/extensions (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase 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 (c) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2013 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 "chrome/browser/extensions/api/signed_in_devices/id_mapping_helper.h" 5 #include "chrome/browser/extensions/api/signed_in_devices/id_mapping_helper.h"
6 6
7 #include "base/memory/scoped_ptr.h" 7 #include "base/memory/scoped_ptr.h"
8 #include "base/memory/scoped_vector.h" 8 #include "base/memory/scoped_vector.h"
9 #include "base/rand_util.h" 9 #include "base/rand_util.h"
10 #include "base/strings/string_number_conversions.h" 10 #include "base/strings/string_number_conversions.h"
(...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after
91 DCHECK(crx_file::id_util::IdIsValid(extension_id)) << extension_id 91 DCHECK(crx_file::id_util::IdIsValid(extension_id)) << extension_id
92 << " is not valid"; 92 << " is not valid";
93 ScopedVector<DeviceInfo> devices = GetAllSignedInDevices(extension_id, 93 ScopedVector<DeviceInfo> devices = GetAllSignedInDevices(extension_id,
94 profile); 94 profile);
95 for (ScopedVector<DeviceInfo>::iterator it = devices.begin(); 95 for (ScopedVector<DeviceInfo>::iterator it = devices.begin();
96 it != devices.end(); 96 it != devices.end();
97 ++it) { 97 ++it) {
98 if ((*it)->guid() == client_id) { 98 if ((*it)->guid() == client_id) {
99 scoped_ptr<DeviceInfo> device(*it); 99 scoped_ptr<DeviceInfo> device(*it);
100 devices.weak_erase(it); 100 devices.weak_erase(it);
101 return device.Pass(); 101 return device;
102 } 102 }
103 } 103 }
104 return scoped_ptr<DeviceInfo>(); 104 return scoped_ptr<DeviceInfo>();
105 } 105 }
106 106
107 } // namespace extensions 107 } // namespace extensions
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698