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

Side by Side Diff: content/browser/background_sync/background_sync_service_impl.cc

Issue 2752533003: Remove ScopedVector from content/browser/. (Closed)
Patch Set: Created 3 years, 9 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 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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/background_sync/background_sync_service_impl.h" 5 #include "content/browser/background_sync/background_sync_service_impl.h"
6 6
7 #include <utility> 7 #include <utility>
8 8
9 #include "base/memory/weak_ptr.h" 9 #include "base/memory/weak_ptr.h"
10 #include "base/stl_util.h" 10 #include "base/stl_util.h"
(...skipping 128 matching lines...) Expand 10 before | Expand all | Expand 10 after
139 139
140 DCHECK(result); 140 DCHECK(result);
141 blink::mojom::SyncRegistrationPtr mojoResult = ToMojoRegistration(*result); 141 blink::mojom::SyncRegistrationPtr mojoResult = ToMojoRegistration(*result);
142 callback.Run(static_cast<blink::mojom::BackgroundSyncError>(status), 142 callback.Run(static_cast<blink::mojom::BackgroundSyncError>(status),
143 std::move(mojoResult)); 143 std::move(mojoResult));
144 } 144 }
145 145
146 void BackgroundSyncServiceImpl::OnGetRegistrationsResult( 146 void BackgroundSyncServiceImpl::OnGetRegistrationsResult(
147 const GetRegistrationsCallback& callback, 147 const GetRegistrationsCallback& callback,
148 BackgroundSyncStatus status, 148 BackgroundSyncStatus status,
149 std::unique_ptr<ScopedVector<BackgroundSyncRegistration>> 149 std::unique_ptr<std::vector<std::unique_ptr<BackgroundSyncRegistration>>>
150 result_registrations) { 150 result_registrations) {
151 DCHECK_CURRENTLY_ON(BrowserThread::IO); 151 DCHECK_CURRENTLY_ON(BrowserThread::IO);
152 DCHECK(result_registrations); 152 DCHECK(result_registrations);
153 153
154 std::vector<blink::mojom::SyncRegistrationPtr> mojo_registrations; 154 std::vector<blink::mojom::SyncRegistrationPtr> mojo_registrations;
155 for (const BackgroundSyncRegistration* registration : *result_registrations) 155 for (const auto& registration : *result_registrations)
156 mojo_registrations.push_back(ToMojoRegistration(*registration)); 156 mojo_registrations.push_back(ToMojoRegistration(*registration));
157 157
158 callback.Run(static_cast<blink::mojom::BackgroundSyncError>(status), 158 callback.Run(static_cast<blink::mojom::BackgroundSyncError>(status),
159 std::move(mojo_registrations)); 159 std::move(mojo_registrations));
160 } 160 }
161 161
162 } // namespace content 162 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698