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/browser_main.h" | 5 #include "chrome/browser/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 801 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
812 // Checking that the local state file for the current profile doesn't exist | 812 // Checking that the local state file for the current profile doesn't exist |
813 // is the most robust way to determine whether we need to inherit or not | 813 // is the most robust way to determine whether we need to inherit or not |
814 // since the parent profile command line flag can be present even when the | 814 // since the parent profile command line flag can be present even when the |
815 // current profile is not a new one, and in that case we do not want to | 815 // current profile is not a new one, and in that case we do not want to |
816 // inherit and reset the user's setting. | 816 // inherit and reset the user's setting. |
817 if (!local_state_file_exists && | 817 if (!local_state_file_exists && |
818 parsed_command_line.HasSwitch(switches::kParentProfile)) { | 818 parsed_command_line.HasSwitch(switches::kParentProfile)) { |
819 FilePath parent_profile = | 819 FilePath parent_profile = |
820 parsed_command_line.GetSwitchValuePath(switches::kParentProfile); | 820 parsed_command_line.GetSwitchValuePath(switches::kParentProfile); |
821 scoped_ptr<PrefService> parent_local_state( | 821 scoped_ptr<PrefService> parent_local_state( |
822 PrefService::CreatePrefService(parent_profile, NULL, NULL, false)); | 822 PrefService::CreatePrefService(parent_profile, NULL, false)); |
823 parent_local_state->RegisterStringPref(prefs::kApplicationLocale, | 823 parent_local_state->RegisterStringPref(prefs::kApplicationLocale, |
824 std::string()); | 824 std::string()); |
825 // Right now, we only inherit the locale setting from the parent profile. | 825 // Right now, we only inherit the locale setting from the parent profile. |
826 local_state->SetString( | 826 local_state->SetString( |
827 prefs::kApplicationLocale, | 827 prefs::kApplicationLocale, |
828 parent_local_state->GetString(prefs::kApplicationLocale)); | 828 parent_local_state->GetString(prefs::kApplicationLocale)); |
829 } | 829 } |
830 | 830 |
831 #if defined(OS_CHROMEOS) | 831 #if defined(OS_CHROMEOS) |
832 if (parsed_command_line.HasSwitch(switches::kLoginManager)) { | 832 if (parsed_command_line.HasSwitch(switches::kLoginManager)) { |
(...skipping 1148 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1981 #if defined(OS_CHROMEOS) | 1981 #if defined(OS_CHROMEOS) |
1982 // To be precise, logout (browser shutdown) is not yet done, but the | 1982 // To be precise, logout (browser shutdown) is not yet done, but the |
1983 // remaining work is negligible, hence we say LogoutDone here. | 1983 // remaining work is negligible, hence we say LogoutDone here. |
1984 chromeos::BootTimesLoader::Get()->AddLogoutTimeMarker("LogoutDone", | 1984 chromeos::BootTimesLoader::Get()->AddLogoutTimeMarker("LogoutDone", |
1985 false); | 1985 false); |
1986 chromeos::BootTimesLoader::Get()->WriteLogoutTimes(); | 1986 chromeos::BootTimesLoader::Get()->WriteLogoutTimes(); |
1987 #endif | 1987 #endif |
1988 TRACE_EVENT_END_ETW("BrowserMain", 0, 0); | 1988 TRACE_EVENT_END_ETW("BrowserMain", 0, 0); |
1989 return result_code; | 1989 return result_code; |
1990 } | 1990 } |
OLD | NEW |