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

Side by Side Diff: content/zygote/zygote_main_linux.cc

Issue 2054593002: Remove MaxSharedMemorySize() function from SysInfo (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 4 years, 6 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 unified diff | Download patch
« no previous file with comments | « base/sys_info_unittest.cc ('k') | services/shell/public/cpp/lib/initialize_base_and_icu.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "content/zygote/zygote_main.h" 5 #include "content/zygote/zygote_main.h"
6 6
7 #include <dlfcn.h> 7 #include <dlfcn.h>
8 #include <fcntl.h> 8 #include <fcntl.h>
9 #include <openssl/crypto.h> 9 #include <openssl/crypto.h>
10 #include <openssl/rand.h> 10 #include <openssl/rand.h>
(...skipping 311 matching lines...) Expand 10 before | Expand all | Expand 10 after
322 } 322 }
323 } 323 }
324 #endif 324 #endif
325 325
326 // This function triggers the static and lazy construction of objects that need 326 // This function triggers the static and lazy construction of objects that need
327 // to be created before imposing the sandbox. 327 // to be created before imposing the sandbox.
328 static void ZygotePreSandboxInit() { 328 static void ZygotePreSandboxInit() {
329 base::RandUint64(); 329 base::RandUint64();
330 330
331 base::SysInfo::AmountOfPhysicalMemory(); 331 base::SysInfo::AmountOfPhysicalMemory();
332 base::SysInfo::MaxSharedMemorySize();
333 base::SysInfo::NumberOfProcessors(); 332 base::SysInfo::NumberOfProcessors();
334 333
335 // ICU DateFormat class (used in base/time_format.cc) needs to get the 334 // ICU DateFormat class (used in base/time_format.cc) needs to get the
336 // Olson timezone ID by accessing the zoneinfo files on disk. After 335 // Olson timezone ID by accessing the zoneinfo files on disk. After
337 // TimeZone::createDefault is called once here, the timezone ID is 336 // TimeZone::createDefault is called once here, the timezone ID is
338 // cached and there's no more need to access the file system. 337 // cached and there's no more need to access the file system.
339 std::unique_ptr<icu::TimeZone> zone(icu::TimeZone::createDefault()); 338 std::unique_ptr<icu::TimeZone> zone(icu::TimeZone::createDefault());
340 339
341 #if defined(ARCH_CPU_ARM_FAMILY) 340 #if defined(ARCH_CPU_ARM_FAMILY)
342 // On ARM, BoringSSL requires access to /proc/cpuinfo to determine processor 341 // On ARM, BoringSSL requires access to /proc/cpuinfo to determine processor
(...skipping 301 matching lines...) Expand 10 before | Expand all | Expand 10 after
644 const bool namespace_sandbox_engaged = sandbox_flags & kSandboxLinuxUserNS; 643 const bool namespace_sandbox_engaged = sandbox_flags & kSandboxLinuxUserNS;
645 CHECK_EQ(using_namespace_sandbox, namespace_sandbox_engaged); 644 CHECK_EQ(using_namespace_sandbox, namespace_sandbox_engaged);
646 645
647 Zygote zygote(sandbox_flags, std::move(fork_delegates), extra_children, 646 Zygote zygote(sandbox_flags, std::move(fork_delegates), extra_children,
648 extra_fds); 647 extra_fds);
649 // This function call can return multiple times, once per fork(). 648 // This function call can return multiple times, once per fork().
650 return zygote.ProcessRequests(); 649 return zygote.ProcessRequests();
651 } 650 }
652 651
653 } // namespace content 652 } // namespace content
OLDNEW
« no previous file with comments | « base/sys_info_unittest.cc ('k') | services/shell/public/cpp/lib/initialize_base_and_icu.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698