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

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 6 years, 1 month 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
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 1022 matching lines...) Expand 10 before | Expand all | Expand 10 after
1033 1033
1034 // Pass on the browser locale. 1034 // Pass on the browser locale.
1035 const std::string locale = 1035 const std::string locale =
1036 GetContentClient()->browser()->GetApplicationLocale(); 1036 GetContentClient()->browser()->GetApplicationLocale();
1037 command_line->AppendSwitchASCII(switches::kLang, locale); 1037 command_line->AppendSwitchASCII(switches::kLang, locale);
1038 1038
1039 // If we run base::FieldTrials, we want to pass to their state to the 1039 // If we run base::FieldTrials, we want to pass to their state to the
1040 // renderer so that it can act in accordance with each state, or record 1040 // renderer so that it can act in accordance with each state, or record
1041 // histograms relating to the base::FieldTrial states. 1041 // histograms relating to the base::FieldTrial states.
1042 std::string field_trial_states; 1042 std::string field_trial_states;
1043 base::FieldTrialList::StatesToString(&field_trial_states); 1043 base::FieldTrialList::AllStatesToString(&field_trial_states);
1044 if (!field_trial_states.empty()) { 1044 if (!field_trial_states.empty()) {
1045 command_line->AppendSwitchASCII(switches::kForceFieldTrials, 1045 command_line->AppendSwitchASCII(switches::kForceFieldTrials,
1046 field_trial_states); 1046 field_trial_states);
1047 } 1047 }
1048 1048
1049 GetContentClient()->browser()->AppendExtraCommandLineSwitches( 1049 GetContentClient()->browser()->AppendExtraCommandLineSwitches(
1050 command_line, GetID()); 1050 command_line, GetID());
1051 1051
1052 if (IsPinchToZoomEnabled()) 1052 if (IsPinchToZoomEnabled())
1053 command_line->AppendSwitch(switches::kEnablePinch); 1053 command_line->AppendSwitch(switches::kEnablePinch);
(...skipping 1182 matching lines...) Expand 10 before | Expand all | Expand 10 after
2236 2236
2237 void RenderProcessHostImpl::DecrementWorkerRefCount() { 2237 void RenderProcessHostImpl::DecrementWorkerRefCount() {
2238 DCHECK_CURRENTLY_ON(BrowserThread::UI); 2238 DCHECK_CURRENTLY_ON(BrowserThread::UI);
2239 DCHECK_GT(worker_ref_count_, 0); 2239 DCHECK_GT(worker_ref_count_, 0);
2240 --worker_ref_count_; 2240 --worker_ref_count_;
2241 if (worker_ref_count_ == 0) 2241 if (worker_ref_count_ == 0)
2242 Cleanup(); 2242 Cleanup();
2243 } 2243 }
2244 2244
2245 } // namespace content 2245 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698