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) { |