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

Side by Side Diff: content/browser/browser_child_process_host_impl.cc

Issue 2546653002: Store and retrieve features from shared memory (Closed)
Patch Set: 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
« base/metrics/field_trial.h ('K') | « base/metrics/field_trial.cc ('k') | no next file » | 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/browser/browser_child_process_host_impl.h" 5 #include "content/browser/browser_child_process_host_impl.h"
6 6
7 #include "base/base_switches.h" 7 #include "base/base_switches.h"
8 #include "base/bind.h" 8 #include "base/bind.h"
9 #include "base/command_line.h" 9 #include "base/command_line.h"
10 #include "base/debug/dump_without_crashing.h" 10 #include "base/debug/dump_without_crashing.h"
(...skipping 201 matching lines...) Expand 10 before | Expand all | Expand 10 after
212 BrowserChildProcessList copy = g_child_process_list.Get(); 212 BrowserChildProcessList copy = g_child_process_list.Get();
213 for (BrowserChildProcessList::iterator it = copy.begin(); 213 for (BrowserChildProcessList::iterator it = copy.begin();
214 it != copy.end(); ++it) { 214 it != copy.end(); ++it) {
215 delete (*it)->delegate(); // ~*HostDelegate deletes *HostImpl. 215 delete (*it)->delegate(); // ~*HostDelegate deletes *HostImpl.
216 } 216 }
217 } 217 }
218 218
219 // static 219 // static
220 void BrowserChildProcessHostImpl::CopyFeatureAndFieldTrialFlags( 220 void BrowserChildProcessHostImpl::CopyFeatureAndFieldTrialFlags(
221 base::CommandLine* cmd_line) { 221 base::CommandLine* cmd_line) {
222 std::string enabled_features;
223 std::string disabled_features;
224 base::FeatureList::GetInstance()->GetFeatureOverrides(&enabled_features,
225 &disabled_features);
226 if (!enabled_features.empty())
227 cmd_line->AppendSwitchASCII(switches::kEnableFeatures, enabled_features);
228 if (!disabled_features.empty())
229 cmd_line->AppendSwitchASCII(switches::kDisableFeatures, disabled_features);
230
231 // If we run base::FieldTrials, we want to pass to their state to the 222 // If we run base::FieldTrials, we want to pass to their state to the
232 // child process so that it can act in accordance with each state. 223 // child process so that it can act in accordance with each state.
233 base::FieldTrialList::CopyFieldTrialStateToFlags(switches::kFieldTrialHandle, 224 base::FieldTrialList::CopyFieldTrialStateToFlags(switches::kFieldTrialHandle,
234 cmd_line); 225 cmd_line);
235 } 226 }
236 227
237 void BrowserChildProcessHostImpl::Launch( 228 void BrowserChildProcessHostImpl::Launch(
238 SandboxedProcessLauncherDelegate* delegate, 229 SandboxedProcessLauncherDelegate* delegate,
239 base::CommandLine* cmd_line, 230 base::CommandLine* cmd_line,
240 bool terminate_on_shutdown) { 231 bool terminate_on_shutdown) {
(...skipping 365 matching lines...) Expand 10 before | Expand all | Expand 10 after
606 597
607 #if defined(OS_WIN) 598 #if defined(OS_WIN)
608 599
609 void BrowserChildProcessHostImpl::OnObjectSignaled(HANDLE object) { 600 void BrowserChildProcessHostImpl::OnObjectSignaled(HANDLE object) {
610 OnChildDisconnected(); 601 OnChildDisconnected();
611 } 602 }
612 603
613 #endif 604 #endif
614 605
615 } // namespace content 606 } // namespace content
OLDNEW
« base/metrics/field_trial.h ('K') | « base/metrics/field_trial.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698