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

Unified Diff: content/browser/background_sync/background_sync_manager_unittest.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 side-by-side diff with in-line comments
Download patch
Index: content/browser/background_sync/background_sync_manager_unittest.cc
diff --git a/content/browser/background_sync/background_sync_manager_unittest.cc b/content/browser/background_sync/background_sync_manager_unittest.cc
index 7219d1fd7901a3f0fbee23184733433113f1e766..429e8bb32adf2dd07ff10e94903cf428bdc72b90 100644
--- a/content/browser/background_sync/background_sync_manager_unittest.cc
+++ b/content/browser/background_sync/background_sync_manager_unittest.cc
@@ -8,6 +8,7 @@
#include <memory>
#include <utility>
+#include <vector>
#include "base/files/scoped_temp_dir.h"
#include "base/location.h"
@@ -207,7 +208,8 @@ class BackgroundSyncManagerTest : public testing::Test {
void StatusAndRegistrationsCallback(
bool* was_called,
BackgroundSyncStatus status,
- std::unique_ptr<ScopedVector<BackgroundSyncRegistration>> registrations) {
+ std::unique_ptr<std::vector<std::unique_ptr<BackgroundSyncRegistration>>>
+ registrations) {
*was_called = true;
callback_status_ = status;
callback_registrations_ = std::move(registrations);
@@ -308,8 +310,8 @@ class BackgroundSyncManagerTest : public testing::Test {
if ((*iter)->options()->tag == registration_options.tag) {
// Transfer the matching registration out of the vector into
// callback_registration_ for testing.
- callback_registration_.reset(*iter);
- callback_registrations_->weak_erase(iter);
+ callback_registration_ = std::move(*iter);
+ callback_registrations_->erase(iter);
return true;
}
}
@@ -425,7 +427,7 @@ class BackgroundSyncManagerTest : public testing::Test {
// Callback values.
BackgroundSyncStatus callback_status_ = BACKGROUND_SYNC_STATUS_OK;
std::unique_ptr<BackgroundSyncRegistration> callback_registration_;
- std::unique_ptr<ScopedVector<BackgroundSyncRegistration>>
+ std::unique_ptr<std::vector<std::unique_ptr<BackgroundSyncRegistration>>>
callback_registrations_;
ServiceWorkerStatusCode callback_sw_status_code_ = SERVICE_WORKER_OK;
int sync_events_called_ = 0;

Powered by Google App Engine
This is Rietveld 408576698