Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[pull] main from chromium:main #67

Merged
merged 114 commits into from
Dec 9, 2021
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
114 commits
Select commit Hold shift + click to select a range
102191c
smartsorting: specify feature states for test
Dec 8, 2021
a9faeb7
Intents: Add metric for interactions with the intent picker icon
tgsergeant Dec 8, 2021
6932944
[FilesDarkMode] Make change default dialog dark mode compliant
ben-reich Dec 8, 2021
0db824b
Revert "Only filter out subsettings with lower scores."
tguilbert-google Dec 8, 2021
99378ce
Roll Chrome Win64 PGO Profile
Dec 8, 2021
38b198e
Remove NaclBrowserDelegate::IsNonSfiModeAllowed
nico Dec 8, 2021
91514c9
Download: Persist range request offsets.
Dec 8, 2021
996c9e3
Rename WebApplicationShortcutsMenuItemInfo
Dec 8, 2021
cabe27c
Revert "Read data from TfLite model file off thread"
Dec 8, 2021
1082f37
metrics: Add MediaFoundation HRESULTs to enums.xml
xhwang-chromium Dec 8, 2021
1ce94ac
Create missing UMA enum value entries from NTP feed metrics
chuim Dec 8, 2021
0406402
personalization: correctly style D/L image tile
Dec 8, 2021
b2a314e
[Frameworks roll] Roll to 415062202 piper revision
Dec 8, 2021
cf0f03f
Don't deserialize if there are no bytes remaining
Dec 8, 2021
7a9fd2d
infra: Remove the chromium.chromium_tests.use_rdb_results experiment
bpastene Dec 8, 2021
8f0fd02
[Code Health] Modernize Value API in session_cleanup_cookie_store.cc
chikamune-cr Dec 8, 2021
51f1ea4
[Code Health] Modernize Value API in logo_service_impl_unittest.cc
chikamune-cr Dec 8, 2021
ea93fb1
[Code Health] Modernize Value API in per_user_topic_subscription_requ…
chikamune-cr Dec 8, 2021
a5933db
[Code Health] Modernize Value API in test_util.cc
chikamune-cr Dec 8, 2021
f78caee
[Code Health] Modernize Value API in scoped_page_focus_override.cc
chikamune-cr Dec 8, 2021
3fd3c48
[Code Health] Modernize Value API in shell_devtools_bindings.cc
chikamune-cr Dec 8, 2021
736ed58
[CrOS Bluetooth] Assume forgetting a device will succeed.
Dec 8, 2021
6f349b0
[Code Health] Modernize Value API in app_window_api.cc
chikamune-cr Dec 8, 2021
9f47779
Make build/android presubmit checked with pylint-2.6.
yoshisatoyanagisawa Dec 9, 2021
338738c
Roll Chrome Win32 PGO Profile
Dec 9, 2021
f9c8c45
exo: Set permissions for the wayland socket's directory.
Dec 9, 2021
2388b39
Remove nonsfi code in base/
nico Dec 9, 2021
4a3e003
[GridFragmentation] Calculate break-appeal before for MovePastBreakpoint
bfgeek Dec 9, 2021
d54cc81
*Scan+MTE: Disable MTE for the scanning thread when scan is in progress
Dec 9, 2021
821beef
Print Preview: Migrate print button, app, and sidebar tests to TS
Dec 9, 2021
b7b3507
Remove enable-experimental-accessibility-switch-access-setup-guide flag
Dec 9, 2021
5f53e94
[FedCM] Support per-directory well-known
yi-gu Dec 9, 2021
ef051a6
Import wpt@b03df354b93b285fe1764d567b7c1a074df4a808
Dec 9, 2021
4d11222
Web apps: Add more metrics for default app duplication
alancutter Dec 9, 2021
f9b6005
Enable the Barcode Detection API on Lacros
reillyeon Dec 9, 2021
312a491
uprev emoji metadata
Dec 9, 2021
c8bef60
Fix BRPQuarantinedCount metric
Dec 9, 2021
22ecf32
shimless: Add new error codes from rmad.proto
greatgoogleymoogley Dec 9, 2021
e0bc9bd
capture_mode_settings: Allow virtual keyboard with folder selection
Dec 9, 2021
56bb7a6
Enable Web-contextual suggestions on SRP on Android.
tomasz-wiszkowski Dec 9, 2021
d7598ba
Remove some nonsfi test data
nico Dec 9, 2021
cfbe605
Add ayui@ to CacheStorage & IDB Owners
ayuishii Dec 9, 2021
e7808d0
[ios, singlentp] Do not return nil in ntpCoordinatorForWebState:
Dec 9, 2021
1420b4f
Removes ReceiverDevice message from the discovery_resources.proto
Dec 9, 2021
e3a5d6d
[LR] Add Heart reaction ♥️
guillaumejenkins Dec 9, 2021
09838b9
Roll Fuchsia SDK from 7.20211208.1.1 to 7.20211208.3.1
Dec 9, 2021
46d631b
Cleanup: Remove the GlobalMediaControlsForCast feature flag
takumif Dec 9, 2021
e56c7f5
Add CdmContext for HWDRM with ARC
Narflex Dec 9, 2021
c13c421
Remove spdy_session_direct_ field
davidben Dec 9, 2021
7fc4193
[Sheriff] Disable ProfileCollectionsScheduler on Mac/iOS
tguilbert-google Dec 9, 2021
06243a2
Reporting: Define data for TME reporting.
Dec 9, 2021
dabe981
system-extensions: Add system-extensions-internals
Dec 9, 2021
438a3ea
Roll src-internal from 4f888a3599e2 to 76dba05e1d10 (1 revision)
Dec 9, 2021
31903b5
Extra debug output for flaky PresentationFeedback test
JoeNotCharlesGoogle Dec 9, 2021
74b11d0
[Sheriff] Disable testSyncDownloadBookmark
tguilbert-google Dec 9, 2021
0e336d0
Roll Dawn from 370e6bd73410 to a97f7520ecb7 (3 revisions)
Dec 9, 2021
d5f0e50
Merge model annotations if there are multiple calls that have non-emp…
Dec 9, 2021
76d3d84
Mask the login username in Login Events
Dec 9, 2021
b1b778a
[Sheriff] Disable NestedSubframeWithUnloadHandler TSAN
tguilbert-google Dec 9, 2021
f602d57
[AutoDark] Add feedback source for auto dark
fwy423 Dec 9, 2021
bfb1d3e
[MPArch] ReportBadMessage on prerendering for PresentationServiceImpl
cdesouza-chromium Dec 9, 2021
7c91657
Allow test_runner to capture Ash logging for Lacros browser tests
Dec 9, 2021
8f69e6c
metrics: Add more DRM_E_* hresults to enums.xml
xhwang-chromium Dec 9, 2021
27f831b
Fix restore DCHECK for shared FrameNavigationEntries from old versions.
creis Dec 9, 2021
f420ddd
Roll src/third_party/libvpx/source/libvpx/ 13f984c21..ab35ee100 (2 co…
Dec 9, 2021
754b511
Web apps: Use histogram functions in PreinstalledWebAppManager
alancutter Dec 9, 2021
f4863c5
[remoting] Restore previous capture rate of 30 FPS.
Dec 9, 2021
1ee1d8b
Disable testSaveRestoreStateWithHistoryItemList on M-
tguilbert-google Dec 9, 2021
ae622c4
media/gpu/v4l2: add VIDIOC_DQBUF ioctl call
Dec 9, 2021
872ef1b
[Floss] Populate initial device properties
Dec 9, 2021
0f47f95
Add URL observer for tailored security
Dec 9, 2021
a552ce5
Revert "Add the kExtension app type to present browser extensions."
bpastene Dec 9, 2021
e76cb75
Remove some pre-CompositeAfterPaint code from tests
progers Dec 9, 2021
3d297b6
Revert "Disable GPU WebGL flakiness workaround"
Dec 9, 2021
0435a00
Shimless: Move the spinner above the title on the splash screen.
Dec 9, 2021
a0f2390
Announce to the screenreader when translation completes or fails.
scott-little Dec 9, 2021
716c1ae
Replace TestAttributionManager with gmock
Dec 9, 2021
a359855
platform: Bump expiry on UnaggregatedUsageTime*.
Dec 9, 2021
1f5324b
Enable DynamicMaxAutocomplete feature on Android
tomasz-wiszkowski Dec 9, 2021
0167c4d
[memories] Make all callsites to use the locale-specific feature check
Dec 9, 2021
c8a90c6
Roll Chrome Mac PGO Profile
Dec 9, 2021
5905630
Add Consented Desktop Notifications for Tailored Security
Dec 9, 2021
7f68bd2
Roll Chrome Linux PGO Profile
Dec 9, 2021
b9f7d08
Rename windowControlsOverlay.getBoundingClientRect->getTitlebarAreaRect
amandabaker Dec 9, 2021
c923f92
NotificationRevamp: Fix header row style and behavior.
Dec 9, 2021
ebc0f2b
[Read Later] Choose custom or regular tabs
bttk Dec 9, 2021
aa081d1
Do not always set physical HID device id on macOS
beaufortfrancois Dec 9, 2021
e0c657e
Remove more nonsfi code
nico Dec 9, 2021
aab4899
Use SchemeHostPort instead of GURL::Replacements in HttpStreamFactory…
rch-chromium-org Dec 9, 2021
4adf33c
Match the max-number in field trial config
fwy423 Dec 9, 2021
9ff4319
Roll Skia from c307c5566d11 to d2eb1d90b3b9 (6 revisions)
Dec 9, 2021
5e5acb9
ArcScreenCapture: Update OWNERS
Dec 9, 2021
4db71f4
blink/handwriting: split wpt into internal and external ones
wacky6 Dec 9, 2021
67ea644
[DragDrop] Hide context menu header image for popup
fwy423 Dec 9, 2021
a3cd805
Desk Templates: Set Activation Window when hiding templates grid
Dec 9, 2021
9e3f6f9
[Messages] Use webcontents focus/lostFocus to control navigation scope
Dec 9, 2021
c81cf18
Extend expiry of Power.FrameDamage* histograms.
betasheet Dec 9, 2021
d75c35d
Remove GraphicsLayer from PaintArtifactCompositor
progers Dec 9, 2021
34341e4
NotificationRevamp: Fix UI style of new expanded notification view.
Dec 9, 2021
0ec2c69
Roll Chrome Win64 PGO Profile
Dec 9, 2021
f455bcf
[pac] Add a specific flag for enabling PAC only
Dec 9, 2021
a8bfe9d
Schedule a write when updating failed launch stability prefs.
Dec 9, 2021
c98a120
[Copy To Clipboard] Record the mime type of the copied data.
melzhan Dec 9, 2021
e5c1470
Roll Catapult from fcd455d2e403 to d16203a89ed9 (4 revisions)
Dec 9, 2021
b66b0b1
[mojo] reject AddBrokerClient on non-broker nodes
krockot Dec 9, 2021
dd3f3e4
Reland "Only filter out subsettings with lower scores."
Dec 9, 2021
e506031
sensors: Add logging for PlatformSensor creation and destruction
nondebug Dec 9, 2021
d3747b0
Remove NonSFI mode part 1.
Dec 9, 2021
6dfe8a0
[cc/metrics] Added median and variance to normalized smoothness UKMs
Dec 9, 2021
80f8c1e
bindings: Mitigate a crash issue of GetCreationContextChecked()
yuki3 Dec 9, 2021
53223d7
[weblayer, skew tests] Refresh skew tests for M97
Dec 9, 2021
79bd5d0
[fencedframe]Re-enable NETHWFFTest.CanRunDiagnosticsDialogOnMainFrame
abhijeetk Dec 9, 2021
8d47193
Roll SwiftShader from a4232c15e287 to d4130e9ac367 (3 revisions)
Dec 9, 2021
1c481c2
Revert "system-extensions: Add system-extensions-internals"
bpastene Dec 9, 2021
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Remove nonsfi code in base/
Bug: 1273132
Change-Id: Ic0abfb7e3553d14532f997a75dc5d83acf0f21b4
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3324642
Auto-Submit: Nico Weber <thakis@chromium.org>
Reviewed-by: Daniel Cheng <dcheng@chromium.org>
Commit-Queue: Daniel Cheng <dcheng@chromium.org>
Cr-Commit-Position: refs/heads/main@{#949824}
  • Loading branch information
nico authored and Chromium LUCI CQ committed Dec 9, 2021
commit 2388b393fc620ef75dbde2da4fe1ff68d1f7c0c1
11 changes: 0 additions & 11 deletions base/files/file_util.cc
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@

namespace base {

#if !defined(OS_NACL_NONSFI)
#if !defined(OS_WIN)
OnceCallback<void(const FilePath&)> GetDeleteFileCallback() {
return BindOnce(IgnoreResult(&DeleteFile));
Expand Down Expand Up @@ -179,7 +178,6 @@ bool TextContentsEqual(const FilePath& filename1, const FilePath& filename2) {

return true;
}
#endif // !defined(OS_NACL_NONSFI)

bool ReadStreamToString(FILE* stream, std::string* contents) {
return ReadStreamToStringWithMaxSize(
Expand All @@ -202,7 +200,6 @@ bool ReadStreamToStringWithMaxSize(FILE* stream,
// chunk size if available.
constexpr int64_t kDefaultChunkSize = 1 << 16;
int64_t chunk_size = kDefaultChunkSize - 1;
#if !defined(OS_NACL_NONSFI)
ScopedBlockingCall scoped_blocking_call(FROM_HERE, BlockingType::MAY_BLOCK);
#if defined(OS_WIN)
BY_HANDLE_FILE_INFORMATION file_info = {};
Expand All @@ -229,9 +226,6 @@ bool ReadStreamToStringWithMaxSize(FILE* stream,
// We need to attempt to read at EOF for feof flag to be set so here we
// use |chunk_size| + 1.
chunk_size = std::min<uint64_t>(chunk_size, max_size) + 1;
#else // !defined(OS_NACL_NONSFI)
chunk_size = kDefaultChunkSize;
#endif // !defined(OS_NACL_NONSFI)
size_t bytes_read_this_pass;
size_t bytes_read_so_far = 0;
bool read_status = true;
Expand Down Expand Up @@ -285,7 +279,6 @@ bool ReadFileToStringWithMaxSize(const FilePath& path,
return ReadStreamToStringWithMaxSize(file_stream.get(), max_size, contents);
}

#if !defined(OS_NACL_NONSFI)
bool IsDirectoryEmpty(const FilePath& dir_path) {
FileEnumerator files(dir_path, false,
FileEnumerator::FILES | FileEnumerator::DIRECTORIES);
Expand Down Expand Up @@ -340,15 +333,13 @@ bool TouchFile(const FilePath& path,

return file.SetTimes(last_accessed, last_modified);
}
#endif // !defined(OS_NACL_NONSFI)

bool CloseFile(FILE* file) {
if (file == nullptr)
return true;
return fclose(file) == 0;
}

#if !defined(OS_NACL_NONSFI)
bool TruncateFile(FILE* file) {
if (file == nullptr)
return false;
Expand Down Expand Up @@ -440,6 +431,4 @@ bool PreReadFileSlow(const FilePath& file_path, int64_t max_bytes) {

} // namespace internal

#endif // !defined(OS_NACL_NONSFI)

} // namespace base
19 changes: 0 additions & 19 deletions base/files/file_util_posix.cc
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,6 @@ namespace base {

namespace {

#if !defined(OS_NACL_NONSFI)
// Helper for VerifyPathControlledByUser.
bool VerifySpecificPathControlledByUser(const FilePath& path,
uid_t owner_uid,
Expand Down Expand Up @@ -314,7 +313,6 @@ bool DoDeleteFile(const FilePath& path, bool recursive) {
}
return success;
}
#endif // !defined(OS_NACL_NONSFI)

#if !defined(OS_APPLE)
// Appends |mode_char| to |mode| before the optional character set encoding; see
Expand All @@ -331,7 +329,6 @@ std::string AppendModeCharacter(StringPiece mode, char mode_char) {

} // namespace

#if !defined(OS_NACL_NONSFI)
FilePath MakeAbsoluteFilePath(const FilePath& input) {
ScopedBlockingCall scoped_blocking_call(FROM_HERE, BlockingType::MAY_BLOCK);
char full_path[PATH_MAX];
Expand Down Expand Up @@ -370,7 +367,6 @@ bool CopyDirectoryExcl(const FilePath& from_path,
bool recursive) {
return DoCopyDirectory(from_path, to_path, recursive, true);
}
#endif // !defined(OS_NACL_NONSFI)

bool CreatePipe(ScopedFD* read_fd, ScopedFD* write_fd, bool non_blocking) {
int fds[2];
Expand Down Expand Up @@ -418,15 +414,11 @@ bool SetNonBlocking(int fd) {
}

bool SetCloseOnExec(int fd) {
#if defined(OS_NACL_NONSFI)
const int flags = 0;
#else
const int flags = fcntl(fd, F_GETFD);
if (flags == -1)
return false;
if (flags & FD_CLOEXEC)
return true;
#endif // defined(OS_NACL_NONSFI)
if (HANDLE_EINTR(fcntl(fd, F_SETFD, flags | FD_CLOEXEC)) == -1)
return false;
return true;
Expand All @@ -442,19 +434,15 @@ bool PathExists(const FilePath& path) {
return access(path.value().c_str(), F_OK) == 0;
}

#if !defined(OS_NACL_NONSFI)
bool PathIsReadable(const FilePath& path) {
ScopedBlockingCall scoped_blocking_call(FROM_HERE, BlockingType::MAY_BLOCK);
return access(path.value().c_str(), R_OK) == 0;
}
#endif // !defined(OS_NACL_NONSFI)

#if !defined(OS_NACL_NONSFI)
bool PathIsWritable(const FilePath& path) {
ScopedBlockingCall scoped_blocking_call(FROM_HERE, BlockingType::MAY_BLOCK);
return access(path.value().c_str(), W_OK) == 0;
}
#endif // !defined(OS_NACL_NONSFI)

bool DirectoryExists(const FilePath& path) {
ScopedBlockingCall scoped_blocking_call(FROM_HERE, BlockingType::MAY_BLOCK);
Expand All @@ -476,8 +464,6 @@ bool ReadFromFD(int fd, char* buffer, size_t bytes) {
return total_read == bytes;
}

#if !defined(OS_NACL_NONSFI)

ScopedFD CreateAndOpenFdForTemporaryFileInDir(const FilePath& directory,
FilePath* path) {
ScopedBlockingCall scoped_blocking_call(
Expand Down Expand Up @@ -814,7 +800,6 @@ bool GetFileInfo(const FilePath& file_path, File::Info* results) {
results->FromStat(file_info);
return true;
}
#endif // !defined(OS_NACL_NONSFI)

FILE* OpenFile(const FilePath& filename, const char* mode) {
// 'e' is unconditionally added below, so be sure there is not one already
Expand Down Expand Up @@ -983,8 +968,6 @@ bool AllocateFileRegion(File* file, int64_t offset, size_t size) {
return true;
}

#if !defined(OS_NACL_NONSFI)

bool AppendToFile(const FilePath& filename, span<const uint8_t> data) {
ScopedBlockingCall scoped_blocking_call(FROM_HERE, BlockingType::MAY_BLOCK);
bool ret = true;
Expand Down Expand Up @@ -1290,8 +1273,6 @@ bool CopyFileContentsWithSendfile(File& infile,

} // namespace internal

#endif // !defined(OS_NACL_NONSFI)

#if defined(OS_LINUX) || defined(OS_CHROMEOS) || defined(OS_AIX)
BASE_EXPORT bool IsPathExecutable(const FilePath& path) {
bool result = false;
Expand Down
3 changes: 0 additions & 3 deletions base/files/file_util_unittest.cc
Original file line number Diff line number Diff line change
Expand Up @@ -4093,7 +4093,6 @@ TEST_F(FileUtilTest, NonExistentContentUriTest) {
}
#endif

#if !defined(OS_NACL_NONSFI)
TEST_F(FileUtilTest, GetUniquePathNumberNoFile) {
// This file does not exist.
const FilePath some_file = temp_dir_.GetPath().Append(FPL("SomeFile.txt"));
Expand Down Expand Up @@ -4206,8 +4205,6 @@ TEST_F(FileUtilTest, PreReadFile_InexistentFile) {
PreReadFile(inexistent_file, /*is_executable=*/false).succeeded());
}

#endif // !defined(OS_NACL_NONSFI)

// Test that temp files obtained racily are all unique (no interference between
// threads). Mimics file operations in DoLaunchChildTestProcess() to rule out
// thread-safety issues @ https://crbug.com/826408#c17.
Expand Down
26 changes: 8 additions & 18 deletions base/posix/unix_domain_socket.cc
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,8 @@

#include <errno.h>
#include <sys/socket.h>
#if !defined(OS_NACL_NONSFI)
#include <sys/uio.h>
#include <sys/un.h>
#endif
#include <unistd.h>

#include <vector>
Expand All @@ -20,15 +19,10 @@
#include "base/posix/eintr_wrapper.h"
#include "build/build_config.h"

#if !defined(OS_NACL_NONSFI)
#include <sys/uio.h>
#endif

namespace base {

const size_t UnixDomainSocket::kMaxFileDescriptors = 16;

#if !defined(OS_NACL_NONSFI)
bool CreateSocketPair(ScopedFD* one, ScopedFD* two) {
int raw_socks[2];
#if defined(OS_APPLE)
Expand Down Expand Up @@ -64,7 +58,6 @@ bool UnixDomainSocket::EnableReceiveProcessId(int fd) {
return true;
#endif // OS_APPLE
}
#endif // !defined(OS_NACL_NONSFI)

// static
bool UnixDomainSocket::SendMsg(int fd,
Expand Down Expand Up @@ -147,11 +140,11 @@ ssize_t UnixDomainSocket::RecvMsgWithFlags(int fd,

const size_t kControlBufferSize =
CMSG_SPACE(sizeof(int) * kMaxFileDescriptors)
#if !defined(OS_NACL_NONSFI) && !defined(OS_APPLE)
// The PNaCl toolchain for Non-SFI binary build and macOS do not support
// ucred. macOS supports xucred, but this structure is insufficient.
#if !defined(OS_APPLE)
// macOS does not support ucred.
// macOS supports xucred, but this structure is insufficient.
+ CMSG_SPACE(sizeof(struct ucred))
#endif // !defined(OS_NACL_NONSFI) && !defined(OS_APPLE)
#endif // !defined(OS_APPLE)
;
char control_buffer[kControlBufferSize];
msg.msg_control = control_buffer;
Expand All @@ -175,16 +168,15 @@ ssize_t UnixDomainSocket::RecvMsgWithFlags(int fd,
wire_fds = reinterpret_cast<int*>(CMSG_DATA(cmsg));
wire_fds_len = payload_len / sizeof(int);
}
#if !defined(OS_NACL_NONSFI) && !defined(OS_APPLE)
// The PNaCl toolchain for Non-SFI binary build and macOS do not support
// SCM_CREDENTIALS.
#if !defined(OS_APPLE)
// macOS does not support SCM_CREDENTIALS.
if (cmsg->cmsg_level == SOL_SOCKET &&
cmsg->cmsg_type == SCM_CREDENTIALS) {
DCHECK_EQ(payload_len, sizeof(struct ucred));
DCHECK_EQ(pid, -1);
pid = reinterpret_cast<struct ucred*>(CMSG_DATA(cmsg))->pid;
}
#endif // !defined(OS_NACL_NONSFI) && !defined(OS_APPLE)
#endif // !defined(OS_APPLE)
}
}

Expand Down Expand Up @@ -225,7 +217,6 @@ ssize_t UnixDomainSocket::RecvMsgWithFlags(int fd,
return r;
}

#if !defined(OS_NACL_NONSFI)
// static
ssize_t UnixDomainSocket::SendRecvMsg(int fd,
uint8_t* reply,
Expand Down Expand Up @@ -283,6 +274,5 @@ ssize_t UnixDomainSocket::SendRecvMsgWithFlags(int fd,

return reply_len;
}
#endif // !defined(OS_NACL_NONSFI)

} // namespace base
6 changes: 0 additions & 6 deletions base/posix/unix_domain_socket.h
Original file line number Diff line number Diff line change
Expand Up @@ -19,24 +19,20 @@ namespace base {

class Pickle;

#if !defined(OS_NACL_NONSFI)
// Creates a connected pair of UNIX-domain SOCK_SEQPACKET sockets, and passes
// ownership of the newly allocated file descriptors to |one| and |two|.
// Returns true on success.
bool BASE_EXPORT CreateSocketPair(ScopedFD* one, ScopedFD* two);
#endif

class BASE_EXPORT UnixDomainSocket {
public:
// Maximum number of file descriptors that can be read by RecvMsg().
static const size_t kMaxFileDescriptors;

#if !defined(OS_NACL_NONSFI)
// Use to enable receiving process IDs in RecvMsgWithPid. Should be called on
// the receiving socket (i.e., the socket passed to RecvMsgWithPid). Returns
// true if successful.
static bool EnableReceiveProcessId(int fd);
#endif // !defined(OS_NACL_NONSFI)

// Use sendmsg to write the given msg and include a vector of file
// descriptors. Returns true if successful.
Expand All @@ -62,7 +58,6 @@ class BASE_EXPORT UnixDomainSocket {
std::vector<ScopedFD>* fds,
ProcessId* pid);

#if !defined(OS_NACL_NONSFI)
// Perform a sendmsg/recvmsg pair.
// 1. This process creates a UNIX SEQPACKET socketpair. Using
// connection-oriented sockets (SEQPACKET or STREAM) is critical here,
Expand Down Expand Up @@ -95,7 +90,6 @@ class BASE_EXPORT UnixDomainSocket {
int recvmsg_flags,
int* result_fd,
const Pickle& request);
#endif // !defined(OS_NACL_NONSFI)

private:
// Similar to RecvMsg, but allows to specify |flags| for recvmsg(2).
Expand Down
2 changes: 0 additions & 2 deletions base/process/kill_posix.cc
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,6 @@ TerminationStatus GetKnownDeadTerminationStatus(ProcessHandle handle,
return GetTerminationStatusImpl(handle, true /* can_block */, exit_code);
}

#if !defined(OS_NACL_NONSFI)
bool WaitForProcessesToExit(const FilePath::StringType& executable_name,
TimeDelta wait,
const ProcessFilter* filter) {
Expand Down Expand Up @@ -174,6 +173,5 @@ void EnsureProcessGetsReaped(Process process) {
#endif // defined(OS_LINUX) || defined(OS_CHROMEOS)

#endif // !defined(OS_APPLE)
#endif // !defined(OS_NACL_NONSFI)

} // namespace base
2 changes: 1 addition & 1 deletion base/process/launch.h
Original file line number Diff line number Diff line change
Expand Up @@ -417,7 +417,7 @@ BASE_EXPORT void RaiseProcessToHighPriority();
// binary. This should not be called in production/released code.
BASE_EXPORT LaunchOptions LaunchOptionsForTest();

#if defined(OS_LINUX) || defined(OS_CHROMEOS) || defined(OS_NACL_NONSFI)
#if defined(OS_LINUX) || defined(OS_CHROMEOS)
// A wrapper for clone with fork-like behavior, meaning that it returns the
// child's pid in the parent and 0 in the child. |flags|, |ptid|, and |ctid| are
// as in the clone system call (the CLONE_VM flag is not supported).
Expand Down
9 changes: 2 additions & 7 deletions base/process/launch_posix.cc
Original file line number Diff line number Diff line change
Expand Up @@ -68,8 +68,6 @@ extern char** environ;

namespace base {

#if !defined(OS_NACL_NONSFI)

namespace {

// Get the process's "environment" (i.e. the thing that setenv/getenv
Expand Down Expand Up @@ -672,10 +670,7 @@ bool GetAppOutputWithExitCode(const CommandLine& cl,
exit_code);
}

#endif // !defined(OS_NACL_NONSFI)

#if defined(OS_LINUX) || defined(OS_CHROMEOS) || defined(OS_NACL_NONSFI) || \
defined(OS_AIX)
#if defined(OS_LINUX) || defined(OS_CHROMEOS) || defined(OS_AIX)
namespace {

// This function runs on the stack specified on the clone call. It uses longjmp
Expand Down Expand Up @@ -750,6 +745,6 @@ pid_t ForkWithFlags(unsigned long flags, pid_t* ptid, pid_t* ctid) {

return 0;
}
#endif // defined(OS_LINUX) || defined(OS_CHROMEOS) || defined(OS_NACL_NONSFI)
#endif // defined(OS_LINUX) || defined(OS_CHROMEOS) || defined(OS_AIX)

} // namespace base
5 changes: 0 additions & 5 deletions base/process/process_posix.cc
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,6 @@

namespace {

#if !defined(OS_NACL_NONSFI)

bool WaitpidWithTimeout(base::ProcessHandle handle,
int* status,
base::TimeDelta wait) {
Expand Down Expand Up @@ -226,7 +224,6 @@ bool WaitForExitWithTimeoutImpl(base::ProcessHandle handle,
}
return exited;
}
#endif // !defined(OS_NACL_NONSFI)

} // namespace

Expand Down Expand Up @@ -310,7 +307,6 @@ void Process::Close() {
// end up w/ a zombie when it does finally exit.
}

#if !defined(OS_NACL_NONSFI)
bool Process::Terminate(int exit_code, bool wait) const {
// exit_code isn't supportable.
DCHECK(IsValid());
Expand All @@ -331,7 +327,6 @@ bool Process::Terminate(int exit_code, bool wait) const {

return did_terminate;
}
#endif // !defined(OS_NACL_NONSFI)

bool Process::WaitForExit(int* exit_code) const {
return WaitForExitWithTimeout(TimeDelta::Max(), exit_code);
Expand Down
Loading