OLD | NEW |
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 Loading... |
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 Loading... |
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 |
OLD | NEW |