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

Unified Diff: chrome/browser/apps/drive/drive_app_provider.cc

Issue 2767893002: Remove ScopedVector from chrome/browser/. (Closed)
Patch Set: Address comments from zea@ 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
« no previous file with comments | « chrome/browser/apps/drive/drive_app_provider.h ('k') | chrome/browser/background/background_mode_manager.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/apps/drive/drive_app_provider.cc
diff --git a/chrome/browser/apps/drive/drive_app_provider.cc b/chrome/browser/apps/drive/drive_app_provider.cc
index c771c6fbe1ba170b72852a2b3b8fc17c2dd23697..ef92109c97aac2c0de7b830040f3c3d4cfeaf9f8 100644
--- a/chrome/browser/apps/drive/drive_app_provider.cc
+++ b/chrome/browser/apps/drive/drive_app_provider.cc
@@ -12,6 +12,7 @@
#include "base/bind_helpers.h"
#include "base/location.h"
#include "base/logging.h"
+#include "base/memory/ptr_util.h"
#include "base/single_thread_task_runner.h"
#include "base/stl_util.h"
#include "base/threading/thread_task_runner_handle.h"
@@ -148,7 +149,7 @@ void DriveAppProvider::SchedulePendingConverters() {
void DriveAppProvider::OnLocalAppConverted(const DriveAppConverter* converter,
bool success) {
- DCHECK_EQ(pending_converters_.front(), converter);
+ DCHECK_EQ(pending_converters_.front().get(), converter);
if (success) {
const bool was_generated =
@@ -199,7 +200,7 @@ void DriveAppProvider::AddOrUpdateDriveApp(
if (IsMappedUrlAppUpToDate(drive_app))
return;
- ScopedVector<DriveAppConverter>::iterator it = pending_converters_.begin();
+ auto it = pending_converters_.begin();
while (it != pending_converters_.end()) {
if (!(*it)->IsStarted() &&
(*it)->drive_app_info().app_id == drive_app.app_id) {
@@ -209,11 +210,10 @@ void DriveAppProvider::AddOrUpdateDriveApp(
}
}
- pending_converters_.push_back(
- new DriveAppConverter(profile_,
- drive_app,
- base::Bind(&DriveAppProvider::OnLocalAppConverted,
- base::Unretained(this))));
+ pending_converters_.push_back(base::MakeUnique<DriveAppConverter>(
+ profile_, drive_app,
+ base::Bind(&DriveAppProvider::OnLocalAppConverted,
+ base::Unretained(this))));
}
void DriveAppProvider::ProcessRemovedDriveApp(const std::string& drive_app_id) {
« no previous file with comments | « chrome/browser/apps/drive/drive_app_provider.h ('k') | chrome/browser/background/background_mode_manager.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698