| 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 378 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 389 } | 389 } |
| 390 | 390 |
| 391 #if defined(OS_CHROMEOS) | 391 #if defined(OS_CHROMEOS) |
| 392 if (parsed_command_line.HasSwitch(switches::kLoginManager)) { | 392 if (parsed_command_line.HasSwitch(switches::kLoginManager)) { |
| 393 std::string owner_locale = local_state->GetString(prefs::kOwnerLocale); | 393 std::string owner_locale = local_state->GetString(prefs::kOwnerLocale); |
| 394 // Ensure that we start with owner's locale. | 394 // Ensure that we start with owner's locale. |
| 395 if (!owner_locale.empty() && | 395 if (!owner_locale.empty() && |
| 396 local_state->GetString(prefs::kApplicationLocale) != owner_locale && | 396 local_state->GetString(prefs::kApplicationLocale) != owner_locale && |
| 397 !local_state->IsManagedPreference(prefs::kApplicationLocale)) { | 397 !local_state->IsManagedPreference(prefs::kApplicationLocale)) { |
| 398 local_state->SetString(prefs::kApplicationLocale, owner_locale); | 398 local_state->SetString(prefs::kApplicationLocale, owner_locale); |
| 399 local_state->ScheduleSavePersistentPrefs(); | |
| 400 } | 399 } |
| 401 } | 400 } |
| 402 #endif | 401 #endif |
| 403 | 402 |
| 404 return local_state; | 403 return local_state; |
| 405 } | 404 } |
| 406 | 405 |
| 407 // Initializes the profile, possibly doing some user prompting to pick a | 406 // Initializes the profile, possibly doing some user prompting to pick a |
| 408 // fallback profile. Returns the newly created profile, or NULL if startup | 407 // fallback profile. Returns the newly created profile, or NULL if startup |
| 409 // should not continue. | 408 // should not continue. |
| (...skipping 1677 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2087 if (env->GetVar(chrome::kPreReadEnvironmentVariable, &pre_read) && | 2086 if (env->GetVar(chrome::kPreReadEnvironmentVariable, &pre_read) && |
| 2088 (pre_read == "0" || pre_read == "1")) { | 2087 (pre_read == "0" || pre_read == "1")) { |
| 2089 std::string uma_name(name); | 2088 std::string uma_name(name); |
| 2090 uma_name += "_PreRead"; | 2089 uma_name += "_PreRead"; |
| 2091 uma_name += pre_read == "1" ? "Enabled" : "Disabled"; | 2090 uma_name += pre_read == "1" ? "Enabled" : "Disabled"; |
| 2092 AddPreReadHistogramTime(uma_name.c_str(), time); | 2091 AddPreReadHistogramTime(uma_name.c_str(), time); |
| 2093 } | 2092 } |
| 2094 #endif | 2093 #endif |
| 2095 #endif | 2094 #endif |
| 2096 } | 2095 } |
| OLD | NEW |