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 775 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
786 // Checking that the local state file for the current profile doesn't exist | 786 // Checking that the local state file for the current profile doesn't exist |
787 // is the most robust way to determine whether we need to inherit or not | 787 // is the most robust way to determine whether we need to inherit or not |
788 // since the parent profile command line flag can be present even when the | 788 // since the parent profile command line flag can be present even when the |
789 // current profile is not a new one, and in that case we do not want to | 789 // current profile is not a new one, and in that case we do not want to |
790 // inherit and reset the user's setting. | 790 // inherit and reset the user's setting. |
791 if (!local_state_file_exists && | 791 if (!local_state_file_exists && |
792 parsed_command_line.HasSwitch(switches::kParentProfile)) { | 792 parsed_command_line.HasSwitch(switches::kParentProfile)) { |
793 FilePath parent_profile = | 793 FilePath parent_profile = |
794 parsed_command_line.GetSwitchValuePath(switches::kParentProfile); | 794 parsed_command_line.GetSwitchValuePath(switches::kParentProfile); |
795 scoped_ptr<PrefService> parent_local_state( | 795 scoped_ptr<PrefService> parent_local_state( |
796 PrefService::CreatePrefService(parent_profile, NULL, NULL)); | 796 PrefService::CreatePrefService(parent_profile, NULL, NULL, false)); |
797 parent_local_state->RegisterStringPref(prefs::kApplicationLocale, | 797 parent_local_state->RegisterStringPref(prefs::kApplicationLocale, |
798 std::string()); | 798 std::string()); |
799 // Right now, we only inherit the locale setting from the parent profile. | 799 // Right now, we only inherit the locale setting from the parent profile. |
800 local_state->SetString( | 800 local_state->SetString( |
801 prefs::kApplicationLocale, | 801 prefs::kApplicationLocale, |
802 parent_local_state->GetString(prefs::kApplicationLocale)); | 802 parent_local_state->GetString(prefs::kApplicationLocale)); |
803 } | 803 } |
804 | 804 |
805 #if defined(OS_CHROMEOS) | 805 #if defined(OS_CHROMEOS) |
806 if (parsed_command_line.HasSwitch(switches::kLoginManager)) { | 806 if (parsed_command_line.HasSwitch(switches::kLoginManager)) { |
(...skipping 1145 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1952 #if defined(OS_CHROMEOS) | 1952 #if defined(OS_CHROMEOS) |
1953 // To be precise, logout (browser shutdown) is not yet done, but the | 1953 // To be precise, logout (browser shutdown) is not yet done, but the |
1954 // remaining work is negligible, hence we say LogoutDone here. | 1954 // remaining work is negligible, hence we say LogoutDone here. |
1955 chromeos::BootTimesLoader::Get()->AddLogoutTimeMarker("LogoutDone", | 1955 chromeos::BootTimesLoader::Get()->AddLogoutTimeMarker("LogoutDone", |
1956 false); | 1956 false); |
1957 chromeos::BootTimesLoader::Get()->WriteLogoutTimes(); | 1957 chromeos::BootTimesLoader::Get()->WriteLogoutTimes(); |
1958 #endif | 1958 #endif |
1959 TRACE_EVENT_END_ETW("BrowserMain", 0, 0); | 1959 TRACE_EVENT_END_ETW("BrowserMain", 0, 0); |
1960 return result_code; | 1960 return result_code; |
1961 } | 1961 } |
OLD | NEW |