| OLD | NEW |
| 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 133 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 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<ScopedVector<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 mojo::Array<blink::mojom::SyncRegistrationPtr> mojo_registrations; | 154 std::vector<blink::mojom::SyncRegistrationPtr> mojo_registrations; |
| 155 for (const BackgroundSyncRegistration* registration : *result_registrations) | 155 for (const BackgroundSyncRegistration* 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 |
| OLD | NEW |