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

Side by Side Diff: content/browser/renderer_host/render_process_host_impl.cc

Issue 700953002: Send all field trials from the browser. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@finch4
Patch Set: Responded to comments. Created 5 years, 11 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 unified diff | Download patch
« no previous file with comments | « chrome/renderer/chrome_render_process_observer.cc ('k') | content/renderer/renderer_main.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 // Represents the browser side of the browser <--> renderer communication 5 // Represents the browser side of the browser <--> renderer communication
6 // channel. There will be one RenderProcessHost per renderer process. 6 // channel. There will be one RenderProcessHost per renderer process.
7 7
8 #include "content/browser/renderer_host/render_process_host_impl.h" 8 #include "content/browser/renderer_host/render_process_host_impl.h"
9 9
10 #include <algorithm> 10 #include <algorithm>
(...skipping 1119 matching lines...) Expand 10 before | Expand all | Expand 10 after
1130 1130
1131 // Pass on the browser locale. 1131 // Pass on the browser locale.
1132 const std::string locale = 1132 const std::string locale =
1133 GetContentClient()->browser()->GetApplicationLocale(); 1133 GetContentClient()->browser()->GetApplicationLocale();
1134 command_line->AppendSwitchASCII(switches::kLang, locale); 1134 command_line->AppendSwitchASCII(switches::kLang, locale);
1135 1135
1136 // If we run base::FieldTrials, we want to pass to their state to the 1136 // If we run base::FieldTrials, we want to pass to their state to the
1137 // renderer so that it can act in accordance with each state, or record 1137 // renderer so that it can act in accordance with each state, or record
1138 // histograms relating to the base::FieldTrial states. 1138 // histograms relating to the base::FieldTrial states.
1139 std::string field_trial_states; 1139 std::string field_trial_states;
1140 base::FieldTrialList::StatesToString(&field_trial_states); 1140 base::FieldTrialList::AllStatesToString(&field_trial_states);
1141 if (!field_trial_states.empty()) { 1141 if (!field_trial_states.empty()) {
1142 command_line->AppendSwitchASCII(switches::kForceFieldTrials, 1142 command_line->AppendSwitchASCII(switches::kForceFieldTrials,
1143 field_trial_states); 1143 field_trial_states);
1144 } 1144 }
1145 1145
1146 GetContentClient()->browser()->AppendExtraCommandLineSwitches( 1146 GetContentClient()->browser()->AppendExtraCommandLineSwitches(
1147 command_line, GetID()); 1147 command_line, GetID());
1148 1148
1149 if (IsPinchToZoomEnabled()) 1149 if (IsPinchToZoomEnabled())
1150 command_line->AppendSwitch(switches::kEnablePinch); 1150 command_line->AppendSwitch(switches::kEnablePinch);
(...skipping 1209 matching lines...) Expand 10 before | Expand all | Expand 10 after
2360 2360
2361 void RenderProcessHostImpl::DecrementWorkerRefCount() { 2361 void RenderProcessHostImpl::DecrementWorkerRefCount() {
2362 DCHECK_CURRENTLY_ON(BrowserThread::UI); 2362 DCHECK_CURRENTLY_ON(BrowserThread::UI);
2363 DCHECK_GT(worker_ref_count_, 0); 2363 DCHECK_GT(worker_ref_count_, 0);
2364 --worker_ref_count_; 2364 --worker_ref_count_;
2365 if (worker_ref_count_ == 0) 2365 if (worker_ref_count_ == 0)
2366 Cleanup(); 2366 Cleanup();
2367 } 2367 }
2368 2368
2369 } // namespace content 2369 } // namespace content
OLDNEW
« no previous file with comments | « chrome/renderer/chrome_render_process_observer.cc ('k') | content/renderer/renderer_main.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698