| 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 765 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 776 // Checking that the local state file for the current profile doesn't exist | 776 // Checking that the local state file for the current profile doesn't exist |
| 777 // is the most robust way to determine whether we need to inherit or not | 777 // is the most robust way to determine whether we need to inherit or not |
| 778 // since the parent profile command line flag can be present even when the | 778 // since the parent profile command line flag can be present even when the |
| 779 // current profile is not a new one, and in that case we do not want to | 779 // current profile is not a new one, and in that case we do not want to |
| 780 // inherit and reset the user's setting. | 780 // inherit and reset the user's setting. |
| 781 if (!local_state_file_exists && | 781 if (!local_state_file_exists && |
| 782 parsed_command_line.HasSwitch(switches::kParentProfile)) { | 782 parsed_command_line.HasSwitch(switches::kParentProfile)) { |
| 783 FilePath parent_profile = | 783 FilePath parent_profile = |
| 784 parsed_command_line.GetSwitchValuePath(switches::kParentProfile); | 784 parsed_command_line.GetSwitchValuePath(switches::kParentProfile); |
| 785 scoped_ptr<PrefService> parent_local_state( | 785 scoped_ptr<PrefService> parent_local_state( |
| 786 PrefService::CreatePrefService(parent_profile, NULL, NULL)); | 786 PrefService::CreatePrefService(parent_profile, NULL, NULL, false)); |
| 787 parent_local_state->RegisterStringPref(prefs::kApplicationLocale, | 787 parent_local_state->RegisterStringPref(prefs::kApplicationLocale, |
| 788 std::string()); | 788 std::string()); |
| 789 // Right now, we only inherit the locale setting from the parent profile. | 789 // Right now, we only inherit the locale setting from the parent profile. |
| 790 local_state->SetString( | 790 local_state->SetString( |
| 791 prefs::kApplicationLocale, | 791 prefs::kApplicationLocale, |
| 792 parent_local_state->GetString(prefs::kApplicationLocale)); | 792 parent_local_state->GetString(prefs::kApplicationLocale)); |
| 793 } | 793 } |
| 794 | 794 |
| 795 #if defined(OS_CHROMEOS) | 795 #if defined(OS_CHROMEOS) |
| 796 if (parsed_command_line.HasSwitch(switches::kLoginManager)) { | 796 if (parsed_command_line.HasSwitch(switches::kLoginManager)) { |
| (...skipping 1127 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1924 #if defined(OS_CHROMEOS) | 1924 #if defined(OS_CHROMEOS) |
| 1925 // To be precise, logout (browser shutdown) is not yet done, but the | 1925 // To be precise, logout (browser shutdown) is not yet done, but the |
| 1926 // remaining work is negligible, hence we say LogoutDone here. | 1926 // remaining work is negligible, hence we say LogoutDone here. |
| 1927 chromeos::BootTimesLoader::Get()->AddLogoutTimeMarker("LogoutDone", | 1927 chromeos::BootTimesLoader::Get()->AddLogoutTimeMarker("LogoutDone", |
| 1928 false); | 1928 false); |
| 1929 chromeos::BootTimesLoader::Get()->WriteLogoutTimes(); | 1929 chromeos::BootTimesLoader::Get()->WriteLogoutTimes(); |
| 1930 #endif | 1930 #endif |
| 1931 TRACE_EVENT_END("BrowserMain", 0, 0); | 1931 TRACE_EVENT_END("BrowserMain", 0, 0); |
| 1932 return result_code; | 1932 return result_code; |
| 1933 } | 1933 } |
| OLD | NEW |