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

Unified Diff: content/zygote/zygote_linux.cc

Issue 2647273002: Remove ScopedVector from content::ZygoteMain() (Closed)
Patch Set: Created 3 years, 11 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 | « content/zygote/zygote_linux.h ('k') | content/zygote/zygote_main.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/zygote/zygote_linux.cc
diff --git a/content/zygote/zygote_linux.cc b/content/zygote/zygote_linux.cc
index 900463e4cea97428ee5c2a0f758316fc71763a4c..37dcac933fa05e6939fb8c4e9d8361e00bf36665 100644
--- a/content/zygote/zygote_linux.cc
+++ b/content/zygote/zygote_linux.cc
@@ -91,7 +91,7 @@ void KillAndReap(pid_t pid, ZygoteForkDelegate* helper) {
} // namespace
Zygote::Zygote(int sandbox_flags,
- ScopedVector<ZygoteForkDelegate> helpers,
+ std::vector<std::unique_ptr<ZygoteForkDelegate>> helpers,
const std::vector<base::ProcessHandle>& extra_children,
const std::vector<int>& extra_fds)
: sandbox_flags_(sandbox_flags),
@@ -418,11 +418,9 @@ int Zygote::ForkWithRealPid(const std::string& process_type,
int* uma_sample,
int* uma_boundary_value) {
ZygoteForkDelegate* helper = NULL;
- for (ScopedVector<ZygoteForkDelegate>::iterator i = helpers_.begin();
- i != helpers_.end();
- ++i) {
+ for (auto i = helpers_.begin(); i != helpers_.end(); ++i) {
if ((*i)->CanHelp(process_type, uma_name, uma_sample, uma_boundary_value)) {
- helper = *i;
+ helper = i->get();
break;
}
}
« no previous file with comments | « content/zygote/zygote_linux.h ('k') | content/zygote/zygote_main.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698