| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 #include <algorithm> | 7 #include <algorithm> |
| 8 #include <string> | 8 #include <string> |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| (...skipping 355 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 366 } | 366 } |
| 367 | 367 |
| 368 #if defined(OS_CHROMEOS) | 368 #if defined(OS_CHROMEOS) |
| 369 if (parsed_command_line.HasSwitch(switches::kLoginManager)) { | 369 if (parsed_command_line.HasSwitch(switches::kLoginManager)) { |
| 370 std::string owner_locale = local_state->GetString(prefs::kOwnerLocale); | 370 std::string owner_locale = local_state->GetString(prefs::kOwnerLocale); |
| 371 // Ensure that we start with owner's locale. | 371 // Ensure that we start with owner's locale. |
| 372 if (!owner_locale.empty() && | 372 if (!owner_locale.empty() && |
| 373 local_state->GetString(prefs::kApplicationLocale) != owner_locale && | 373 local_state->GetString(prefs::kApplicationLocale) != owner_locale && |
| 374 !local_state->IsManagedPreference(prefs::kApplicationLocale)) { | 374 !local_state->IsManagedPreference(prefs::kApplicationLocale)) { |
| 375 local_state->SetString(prefs::kApplicationLocale, owner_locale); | 375 local_state->SetString(prefs::kApplicationLocale, owner_locale); |
| 376 local_state->ScheduleSavePersistentPrefs(); | |
| 377 } | 376 } |
| 378 } | 377 } |
| 379 #endif | 378 #endif |
| 380 | 379 |
| 381 return local_state; | 380 return local_state; |
| 382 } | 381 } |
| 383 | 382 |
| 384 // Initializes the profile, possibly doing some user prompting to pick a | 383 // Initializes the profile, possibly doing some user prompting to pick a |
| 385 // fallback profile. Returns the newly created profile, or NULL if startup | 384 // fallback profile. Returns the newly created profile, or NULL if startup |
| 386 // should not continue. | 385 // should not continue. |
| (...skipping 1595 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1982 if (base::win::GetVersion() <= base::win::VERSION_XP) | 1981 if (base::win::GetVersion() <= base::win::VERSION_XP) |
| 1983 uma_name += "_XP"; | 1982 uma_name += "_XP"; |
| 1984 | 1983 |
| 1985 uma_name += "_PreRead"; | 1984 uma_name += "_PreRead"; |
| 1986 uma_name += pre_read == "1" ? "Enabled" : "Disabled"; | 1985 uma_name += pre_read == "1" ? "Enabled" : "Disabled"; |
| 1987 AddPreReadHistogramTime(uma_name.c_str(), time); | 1986 AddPreReadHistogramTime(uma_name.c_str(), time); |
| 1988 } | 1987 } |
| 1989 #endif | 1988 #endif |
| 1990 #endif | 1989 #endif |
| 1991 } | 1990 } |
| OLD | NEW |