| 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 #include "chrome/browser/chrome_browser_main.h" | 5 #include "chrome/browser/chrome_browser_main.h" |
| 6 | 6 |
| 7 #if defined(TOOLKIT_GTK) | 7 #if defined(TOOLKIT_GTK) |
| 8 #include <gtk/gtk.h> | 8 #include <gtk/gtk.h> |
| 9 #endif | 9 #endif |
| 10 | 10 |
| (...skipping 141 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 152 #endif | 152 #endif |
| 153 | 153 |
| 154 #if defined(OS_LINUX) && !defined(OS_CHROMEOS) | 154 #if defined(OS_LINUX) && !defined(OS_CHROMEOS) |
| 155 #include "chrome/browser/first_run/upgrade_util_linux.h" | 155 #include "chrome/browser/first_run/upgrade_util_linux.h" |
| 156 #endif | 156 #endif |
| 157 | 157 |
| 158 #if defined(OS_CHROMEOS) | 158 #if defined(OS_CHROMEOS) |
| 159 #include "chrome/browser/chromeos/cros/cros_library.h" | 159 #include "chrome/browser/chromeos/cros/cros_library.h" |
| 160 #include "chrome/browser/chromeos/settings/cros_settings.h" | 160 #include "chrome/browser/chromeos/settings/cros_settings.h" |
| 161 #include "chrome/browser/chromeos/settings/cros_settings_names.h" | 161 #include "chrome/browser/chromeos/settings/cros_settings_names.h" |
| 162 #include "chromeos/chromeos_switches.h" |
| 162 #endif | 163 #endif |
| 163 | 164 |
| 164 // TODO(port): several win-only methods have been pulled out of this, but | 165 // TODO(port): several win-only methods have been pulled out of this, but |
| 165 // BrowserMain() as a whole needs to be broken apart so that it's usable by | 166 // BrowserMain() as a whole needs to be broken apart so that it's usable by |
| 166 // other platforms. For now, it's just a stub. This is a serious work in | 167 // other platforms. For now, it's just a stub. This is a serious work in |
| 167 // progress and should not be taken as an indication of a real refactoring. | 168 // progress and should not be taken as an indication of a real refactoring. |
| 168 | 169 |
| 169 #if defined(OS_WIN) | 170 #if defined(OS_WIN) |
| 170 #include "base/environment.h" // For PreRead experiment. | 171 #include "base/environment.h" // For PreRead experiment. |
| 171 #include "base/win/windows_version.h" | 172 #include "base/win/windows_version.h" |
| (...skipping 140 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 312 registry, | 313 registry, |
| 313 false)); | 314 false)); |
| 314 registry->RegisterStringPref(prefs::kApplicationLocale, std::string()); | 315 registry->RegisterStringPref(prefs::kApplicationLocale, std::string()); |
| 315 // Right now, we only inherit the locale setting from the parent profile. | 316 // Right now, we only inherit the locale setting from the parent profile. |
| 316 local_state->SetString( | 317 local_state->SetString( |
| 317 prefs::kApplicationLocale, | 318 prefs::kApplicationLocale, |
| 318 parent_local_state->GetString(prefs::kApplicationLocale)); | 319 parent_local_state->GetString(prefs::kApplicationLocale)); |
| 319 } | 320 } |
| 320 | 321 |
| 321 #if defined(OS_CHROMEOS) | 322 #if defined(OS_CHROMEOS) |
| 322 if (parsed_command_line.HasSwitch(switches::kLoginManager)) { | 323 if (parsed_command_line.HasSwitch(chromeos::switches::kLoginManager)) { |
| 323 std::string owner_locale = local_state->GetString(prefs::kOwnerLocale); | 324 std::string owner_locale = local_state->GetString(prefs::kOwnerLocale); |
| 324 // Ensure that we start with owner's locale. | 325 // Ensure that we start with owner's locale. |
| 325 if (!owner_locale.empty() && | 326 if (!owner_locale.empty() && |
| 326 local_state->GetString(prefs::kApplicationLocale) != owner_locale && | 327 local_state->GetString(prefs::kApplicationLocale) != owner_locale && |
| 327 !local_state->IsManagedPreference(prefs::kApplicationLocale)) { | 328 !local_state->IsManagedPreference(prefs::kApplicationLocale)) { |
| 328 local_state->SetString(prefs::kApplicationLocale, owner_locale); | 329 local_state->SetString(prefs::kApplicationLocale, owner_locale); |
| 329 } | 330 } |
| 330 } | 331 } |
| 331 #endif | 332 #endif |
| 332 | 333 |
| (...skipping 1462 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1795 if (base::win::GetVersion() <= base::win::VERSION_XP) | 1796 if (base::win::GetVersion() <= base::win::VERSION_XP) |
| 1796 uma_name += "_XP"; | 1797 uma_name += "_XP"; |
| 1797 | 1798 |
| 1798 uma_name += "_PreRead_"; | 1799 uma_name += "_PreRead_"; |
| 1799 uma_name += pre_read_percentage; | 1800 uma_name += pre_read_percentage; |
| 1800 AddPreReadHistogramTime(uma_name.c_str(), time); | 1801 AddPreReadHistogramTime(uma_name.c_str(), time); |
| 1801 } | 1802 } |
| 1802 #endif | 1803 #endif |
| 1803 #endif | 1804 #endif |
| 1804 } | 1805 } |
| OLD | NEW |