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

Unified Diff: content/zygote/zygote_main_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_main.h ('k') | extensions/shell/app/shell_main_delegate.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/zygote/zygote_main_linux.cc
diff --git a/content/zygote/zygote_main_linux.cc b/content/zygote/zygote_main_linux.cc
index 02beffae8a89ff2488c5be74efc600316fb31f06..241ed27d3823eb1348a82e3126774ea31d5be0ca 100644
--- a/content/zygote/zygote_main_linux.cc
+++ b/content/zygote/zygote_main_linux.cc
@@ -15,16 +15,13 @@
#include <sys/types.h>
#include <unistd.h>
-#include <memory>
#include <set>
#include <utility>
-#include <vector>
#include "base/bind.h"
#include "base/command_line.h"
#include "base/compiler_specific.h"
#include "base/lazy_instance.h"
-#include "base/memory/scoped_vector.h"
#include "base/native_library.h"
#include "base/pickle.h"
#include "base/posix/eintr_wrapper.h"
@@ -566,8 +563,9 @@ static void EnterLayerOneSandbox(LinuxSandbox* linux_sandbox,
}
}
-bool ZygoteMain(const MainFunctionParams& params,
- ScopedVector<ZygoteForkDelegate> fork_delegates) {
+bool ZygoteMain(
+ const MainFunctionParams& params,
+ std::vector<std::unique_ptr<ZygoteForkDelegate>> fork_delegates) {
g_am_zygote_or_renderer = true;
std::vector<int> fds_to_close_post_fork;
@@ -620,7 +618,7 @@ bool ZygoteMain(const MainFunctionParams& params,
VLOG(1) << "ZygoteMain: initializing " << fork_delegates.size()
<< " fork delegates";
- for (ZygoteForkDelegate* fork_delegate : fork_delegates) {
+ for (const auto& fork_delegate : fork_delegates) {
fork_delegate->Init(GetSandboxFD(), using_layer1_sandbox);
}
« no previous file with comments | « content/zygote/zygote_main.h ('k') | extensions/shell/app/shell_main_delegate.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698