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

Unified Diff: chrome/common/safe_browsing/mach_o_image_reader_mac.cc

Issue 2802973003: Remove ScopedVector from chrome/ (Closed)
Patch Set: Created 3 years, 8 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: chrome/common/safe_browsing/mach_o_image_reader_mac.cc
diff --git a/chrome/common/safe_browsing/mach_o_image_reader_mac.cc b/chrome/common/safe_browsing/mach_o_image_reader_mac.cc
index 9805ee519ccb3c9a4dd246d1bc6eda117e760439..a204c8915dc64fe95da3e052cd33efa2e16d6035 100644
--- a/chrome/common/safe_browsing/mach_o_image_reader_mac.cc
+++ b/chrome/common/safe_browsing/mach_o_image_reader_mac.cc
@@ -9,6 +9,7 @@
#include <mach-o/loader.h>
#include "base/logging.h"
+#include "base/memory/ptr_util.h"
#include "base/numerics/safe_math.h"
namespace safe_browsing {
@@ -133,7 +134,7 @@ bool MachOImageReader::Initialize(const uint8_t* image, size_t image_size) {
if (!slice.IsValid())
return false;
- fat_images_.push_back(new MachOImageReader());
+ fat_images_.push_back(base::MakeUnique<MachOImageReader>());
if (!fat_images_.back()->Initialize(slice.data(), slice.size()))
return false;
@@ -201,8 +202,8 @@ bool MachOImageReader::IsFat() {
std::vector<MachOImageReader*> MachOImageReader::GetFatImages() {
DCHECK(is_fat_);
std::vector<MachOImageReader*> images;
- for (auto it = fat_images_.begin(); it != fat_images_.end(); ++it)
- images.push_back(*it);
+ for (const auto& image : fat_images_)
+ images.push_back(image.get());
return images;
}

Powered by Google App Engine
This is Rietveld 408576698