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 1021 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1032 | 1032 |
1033 // Pass on the browser locale. | 1033 // Pass on the browser locale. |
1034 const std::string locale = | 1034 const std::string locale = |
1035 GetContentClient()->browser()->GetApplicationLocale(); | 1035 GetContentClient()->browser()->GetApplicationLocale(); |
1036 command_line->AppendSwitchASCII(switches::kLang, locale); | 1036 command_line->AppendSwitchASCII(switches::kLang, locale); |
1037 | 1037 |
1038 // If we run base::FieldTrials, we want to pass to their state to the | 1038 // If we run base::FieldTrials, we want to pass to their state to the |
1039 // renderer so that it can act in accordance with each state, or record | 1039 // renderer so that it can act in accordance with each state, or record |
1040 // histograms relating to the base::FieldTrial states. | 1040 // histograms relating to the base::FieldTrial states. |
1041 std::string field_trial_states; | 1041 std::string field_trial_states; |
1042 base::FieldTrialList::StatesToString(&field_trial_states); | 1042 base::FieldTrialList::AllStatesToString(&field_trial_states); |
1043 if (!field_trial_states.empty()) { | 1043 if (!field_trial_states.empty()) { |
1044 command_line->AppendSwitchASCII(switches::kForceFieldTrials, | 1044 command_line->AppendSwitchASCII(switches::kForceFieldTrials, |
1045 field_trial_states); | 1045 field_trial_states); |
1046 } | 1046 } |
1047 | 1047 |
1048 GetContentClient()->browser()->AppendExtraCommandLineSwitches( | 1048 GetContentClient()->browser()->AppendExtraCommandLineSwitches( |
1049 command_line, GetID()); | 1049 command_line, GetID()); |
1050 | 1050 |
1051 if (IsPinchToZoomEnabled()) | 1051 if (IsPinchToZoomEnabled()) |
1052 command_line->AppendSwitch(switches::kEnablePinch); | 1052 command_line->AppendSwitch(switches::kEnablePinch); |
(...skipping 1183 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
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 |
OLD | NEW |