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

Side by Side Diff: base/metrics/field_trial.h

Issue 2565683003: Share field trial allocator on Mac (Closed)
Patch Set: Use intentionally dummy value and fix comment Created 4 years 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/memory/shared_memory_handle_mac.cc ('k') | base/metrics/field_trial.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 // FieldTrial is a class for handling details of statistical experiments 5 // FieldTrial is a class for handling details of statistical experiments
6 // performed by actual users in the field (i.e., in a shipped or beta product). 6 // performed by actual users in the field (i.e., in a shipped or beta product).
7 // All code is called exclusively on the UI thread currently. 7 // All code is called exclusively on the UI thread currently.
8 // 8 //
9 // The simplest example is an experiment to see whether one of two options 9 // The simplest example is an experiment to see whether one of two options
10 // produces "better" results across our user population. In that scenario, UMA 10 // produces "better" results across our user population. In that scenario, UMA
(...skipping 575 matching lines...) Expand 10 before | Expand all | Expand 10 after
586 FRIEND_TEST_ALL_PREFIXES(FieldTrialListTest, AssociateFieldTrialParams); 586 FRIEND_TEST_ALL_PREFIXES(FieldTrialListTest, AssociateFieldTrialParams);
587 FRIEND_TEST_ALL_PREFIXES(FieldTrialListTest, ClearParamsFromSharedMemory); 587 FRIEND_TEST_ALL_PREFIXES(FieldTrialListTest, ClearParamsFromSharedMemory);
588 588
589 #if defined(OS_WIN) 589 #if defined(OS_WIN)
590 // Takes in |handle_switch| from the command line which represents the shared 590 // Takes in |handle_switch| from the command line which represents the shared
591 // memory handle for field trials, parses it, and creates the field trials. 591 // memory handle for field trials, parses it, and creates the field trials.
592 // Returns true on success, false on failure. 592 // Returns true on success, false on failure.
593 static bool CreateTrialsFromHandleSwitch(const std::string& handle_switch); 593 static bool CreateTrialsFromHandleSwitch(const std::string& handle_switch);
594 #endif 594 #endif
595 595
596 #if defined(OS_POSIX) && !defined(OS_NACL) && !defined(OS_MACOSX) && \ 596 #if defined(OS_POSIX) && !defined(OS_NACL) && !defined(OS_ANDROID)
597 !defined(OS_ANDROID)
598 // On POSIX systems that use the zygote, we look up the correct fd that backs 597 // On POSIX systems that use the zygote, we look up the correct fd that backs
599 // the shared memory segment containing the field trials by looking it up via 598 // the shared memory segment containing the field trials by looking it up via
600 // an fd key in GlobalDescriptors. Returns true on success, false on failure. 599 // an fd key in GlobalDescriptors. Returns true on success, false on failure.
601 static bool CreateTrialsFromDescriptor(int fd_key); 600 static bool CreateTrialsFromDescriptor(int fd_key);
602 #endif 601 #endif
603 602
604 // Takes an unmapped SharedMemoryHandle, creates a SharedMemory object from it 603 // Takes an unmapped SharedMemoryHandle, creates a SharedMemory object from it
605 // and maps it with the correct size. 604 // and maps it with the correct size.
606 static bool CreateTrialsFromSharedMemoryHandle(SharedMemoryHandle shm_handle); 605 static bool CreateTrialsFromSharedMemoryHandle(SharedMemoryHandle shm_handle);
607 606
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after
675 674
676 // Tracks whether CreateTrialsFromCommandLine() has been called. 675 // Tracks whether CreateTrialsFromCommandLine() has been called.
677 bool create_trials_from_command_line_called_ = false; 676 bool create_trials_from_command_line_called_ = false;
678 677
679 DISALLOW_COPY_AND_ASSIGN(FieldTrialList); 678 DISALLOW_COPY_AND_ASSIGN(FieldTrialList);
680 }; 679 };
681 680
682 } // namespace base 681 } // namespace base
683 682
684 #endif // BASE_METRICS_FIELD_TRIAL_H_ 683 #endif // BASE_METRICS_FIELD_TRIAL_H_
OLDNEW
« no previous file with comments | « base/memory/shared_memory_handle_mac.cc ('k') | base/metrics/field_trial.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698