| OLD | NEW |
| 1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2006-2008 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 "build/build_config.h" | 5 #include "build/build_config.h" |
| 6 | 6 |
| 7 #include <algorithm> | 7 #include <algorithm> |
| 8 | 8 |
| 9 #include "base/command_line.h" | 9 #include "base/command_line.h" |
| 10 #include "base/field_trial.h" | 10 #include "base/field_trial.h" |
| (...skipping 288 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 299 parsed_command_line.GetSwitchValue(switches::kParentProfile); | 299 parsed_command_line.GetSwitchValue(switches::kParentProfile); |
| 300 PrefService parent_local_state(parent_profile); | 300 PrefService parent_local_state(parent_profile); |
| 301 parent_local_state.RegisterStringPref(prefs::kApplicationLocale, | 301 parent_local_state.RegisterStringPref(prefs::kApplicationLocale, |
| 302 std::wstring()); | 302 std::wstring()); |
| 303 // Right now, we only inherit the locale setting from the parent profile. | 303 // Right now, we only inherit the locale setting from the parent profile. |
| 304 local_state->SetString( | 304 local_state->SetString( |
| 305 prefs::kApplicationLocale, | 305 prefs::kApplicationLocale, |
| 306 parent_local_state.GetString(prefs::kApplicationLocale)); | 306 parent_local_state.GetString(prefs::kApplicationLocale)); |
| 307 } | 307 } |
| 308 | 308 |
| 309 #if defined(OS_WIN) || defined(OS_LINUX) | |
| 310 // If we're running tests (ui_task is non-null), then the ResourceBundle | 309 // If we're running tests (ui_task is non-null), then the ResourceBundle |
| 311 // has already been initialized. | 310 // has already been initialized. |
| 312 if (!parameters.ui_task) { | 311 if (!parameters.ui_task) { |
| 313 ResourceBundle::InitSharedInstance( | 312 ResourceBundle::InitSharedInstance( |
| 314 local_state->GetString(prefs::kApplicationLocale)); | 313 local_state->GetString(prefs::kApplicationLocale)); |
| 315 // We only load the theme dll in the browser process. | 314 // We only load the theme dll in the browser process. |
| 316 ResourceBundle::GetSharedInstance().LoadThemeResources(); | 315 ResourceBundle::GetSharedInstance().LoadThemeResources(); |
| 317 } | 316 } |
| 318 #endif // defined(OS_WIN) || defined(OS_LINUX) | |
| 319 | 317 |
| 320 if (!parsed_command_line.HasSwitch(switches::kNoErrorDialogs)) { | 318 if (!parsed_command_line.HasSwitch(switches::kNoErrorDialogs)) { |
| 321 // Display a warning if the user is running windows 2000. | 319 // Display a warning if the user is running windows 2000. |
| 322 // TODO(port). We should probably change this to a "check for minimum | 320 // TODO(port). We should probably change this to a "check for minimum |
| 323 // requirements" function, implemented by each platform. | 321 // requirements" function, implemented by each platform. |
| 324 CheckForWin2000(); | 322 CheckForWin2000(); |
| 325 } | 323 } |
| 326 | 324 |
| 327 // Initialize histogram statistics gathering system. | 325 // Initialize histogram statistics gathering system. |
| 328 StatisticsRecorder statistics; | 326 StatisticsRecorder statistics; |
| (...skipping 242 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 571 if (metrics) | 569 if (metrics) |
| 572 metrics->Stop(); | 570 metrics->Stop(); |
| 573 | 571 |
| 574 // browser_shutdown takes care of deleting browser_process, so we need to | 572 // browser_shutdown takes care of deleting browser_process, so we need to |
| 575 // release it. | 573 // release it. |
| 576 browser_process.release(); | 574 browser_process.release(); |
| 577 browser_shutdown::Shutdown(); | 575 browser_shutdown::Shutdown(); |
| 578 | 576 |
| 579 return result_code; | 577 return result_code; |
| 580 } | 578 } |
| OLD | NEW |