OLD | NEW |
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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 613 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
624 // Checking that the local state file for the current profile doesn't exist | 624 // Checking that the local state file for the current profile doesn't exist |
625 // is the most robust way to determine whether we need to inherit or not | 625 // is the most robust way to determine whether we need to inherit or not |
626 // since the parent profile command line flag can be present even when the | 626 // since the parent profile command line flag can be present even when the |
627 // current profile is not a new one, and in that case we do not want to | 627 // current profile is not a new one, and in that case we do not want to |
628 // inherit and reset the user's setting. | 628 // inherit and reset the user's setting. |
629 if (!local_state_file_exists && | 629 if (!local_state_file_exists && |
630 parsed_command_line.HasSwitch(switches::kParentProfile)) { | 630 parsed_command_line.HasSwitch(switches::kParentProfile)) { |
631 FilePath parent_profile = | 631 FilePath parent_profile = |
632 parsed_command_line.GetSwitchValuePath(switches::kParentProfile); | 632 parsed_command_line.GetSwitchValuePath(switches::kParentProfile); |
633 scoped_ptr<PrefService> parent_local_state( | 633 scoped_ptr<PrefService> parent_local_state( |
634 PrefService::CreatePrefService(parent_profile, NULL)); | 634 PrefService::CreatePrefService(parent_profile, NULL, NULL)); |
635 parent_local_state->RegisterStringPref(prefs::kApplicationLocale, | 635 parent_local_state->RegisterStringPref(prefs::kApplicationLocale, |
636 std::string()); | 636 std::string()); |
637 // Right now, we only inherit the locale setting from the parent profile. | 637 // Right now, we only inherit the locale setting from the parent profile. |
638 local_state->SetString( | 638 local_state->SetString( |
639 prefs::kApplicationLocale, | 639 prefs::kApplicationLocale, |
640 parent_local_state->GetString(prefs::kApplicationLocale)); | 640 parent_local_state->GetString(prefs::kApplicationLocale)); |
641 } | 641 } |
642 | 642 |
643 return local_state; | 643 return local_state; |
644 } | 644 } |
(...skipping 1055 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1700 #if defined(OS_CHROMEOS) | 1700 #if defined(OS_CHROMEOS) |
1701 // To be precise, logout (browser shutdown) is not yet done, but the | 1701 // To be precise, logout (browser shutdown) is not yet done, but the |
1702 // remaining work is negligible, hence we say LogoutDone here. | 1702 // remaining work is negligible, hence we say LogoutDone here. |
1703 chromeos::BootTimesLoader::Get()->AddLogoutTimeMarker("LogoutDone", | 1703 chromeos::BootTimesLoader::Get()->AddLogoutTimeMarker("LogoutDone", |
1704 false); | 1704 false); |
1705 chromeos::BootTimesLoader::Get()->WriteLogoutTimes(); | 1705 chromeos::BootTimesLoader::Get()->WriteLogoutTimes(); |
1706 #endif | 1706 #endif |
1707 TRACE_EVENT_END("BrowserMain", 0, 0); | 1707 TRACE_EVENT_END("BrowserMain", 0, 0); |
1708 return result_code; | 1708 return result_code; |
1709 } | 1709 } |
OLD | NEW |