Index: components/task_scheduler_util/common/variations_util.h |
diff --git a/components/task_scheduler_util/common/variations_util.h b/components/task_scheduler_util/common/variations_util.h |
index aa37d25b2391d370443412bc5607a3a014e2a4e5..d4076de965879c884144156efa0db9c6217e27bd 100644 |
--- a/components/task_scheduler_util/common/variations_util.h |
+++ b/components/task_scheduler_util/common/variations_util.h |
@@ -9,9 +9,14 @@ |
#include <string> |
#include <vector> |
+#include "base/strings/string_piece.h" |
#include "base/task_scheduler/scheduler_worker_pool_params.h" |
#include "base/threading/platform_thread.h" |
+namespace base { |
+class CommandLine; |
+} |
+ |
namespace task_scheduler_util { |
class SchedulerImmutableWorkerPoolParams { |
@@ -36,6 +41,17 @@ std::vector<base::SchedulerWorkerPoolParams> GetWorkerPoolParams( |
constant_worker_pool_params_vector, |
const std::map<std::string, std::string>& variation_params); |
+// Serializes variation params from the BrowserScheduler field trial whose key |
+// start with |prefix| to the --task-scheduler-variation-params switch of |
+// |command_line|. |
+void AddVariationParamsToCommandLine(base::StringPiece key_prefix, |
+ base::CommandLine* command_line); |
+ |
+// Returns a map of key-value pairs deserialized from the |
+// --task-scheduler-variation-params switch of |command_line|. |
+std::map<std::string, std::string> GetVariationParamsFromCommandLine( |
+ const base::CommandLine& command_line); |
+ |
} // namespace task_scheduler_util |
#endif // COMPONENTS_TASK_SCHEDULER_UTIL_COMMON_VARIATIONS_UTIL_H_ |