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

Unified Diff: content/browser/child_process_launcher_helper_posix.cc

Issue 2862123002: Pass the GUID for the SharedMemoryHandle used by base::FieldTrialList. (Closed)
Patch Set: Pass string piece by value. Created 3 years, 7 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 | « base/metrics/field_trial_unittest.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/child_process_launcher_helper_posix.cc
diff --git a/content/browser/child_process_launcher_helper_posix.cc b/content/browser/child_process_launcher_helper_posix.cc
index 96efa993d5158a944547d90ceed3d84e4e49a15d..9b2f6e0fc6285b2453e77974a4e12a4f8bde8ddc 100644
--- a/content/browser/child_process_launcher_helper_posix.cc
+++ b/content/browser/child_process_launcher_helper_posix.cc
@@ -80,9 +80,12 @@ std::unique_ptr<FileDescriptorInfo> CreateDefaultPosixFilesToMap(
std::unique_ptr<FileDescriptorInfo> files_to_register(
FileDescriptorInfoImpl::Create());
- int field_trial_handle = base::FieldTrialList::GetFieldTrialHandle();
- if (field_trial_handle != base::kInvalidPlatformFile)
- files_to_register->Share(kFieldTrialDescriptor, field_trial_handle);
+ base::SharedMemoryHandle shm = base::FieldTrialList::GetFieldTrialHandle();
+ if (shm.IsValid()) {
+ files_to_register->Share(
+ kFieldTrialDescriptor,
+ base::SharedMemory::GetFdFromSharedMemoryHandle(shm));
+ }
DCHECK(mojo_client_handle.is_valid());
files_to_register->Share(kMojoIPCChannel, mojo_client_handle.handle);
« no previous file with comments | « base/metrics/field_trial_unittest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698