| OLD | NEW |
| 1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2013 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/chromeos/chrome_browser_main_chromeos.h" | 5 #include "chrome/browser/chromeos/chrome_browser_main_chromeos.h" |
| 6 | 6 |
| 7 #include <string> | 7 #include <string> |
| 8 #include <vector> | 8 #include <vector> |
| 9 | 9 |
| 10 #include "ash/ash_switches.h" | 10 #include "ash/ash_switches.h" |
| (...skipping 585 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 596 // -- This used to be in ChromeBrowserMainParts::PreMainMessageLoopRun() | 596 // -- This used to be in ChromeBrowserMainParts::PreMainMessageLoopRun() |
| 597 // -- just after CreateProfile(). | 597 // -- just after CreateProfile(). |
| 598 | 598 |
| 599 // Restarting Chrome inside existing user session. Possible cases: | 599 // Restarting Chrome inside existing user session. Possible cases: |
| 600 // 1. Chrome is restarted after crash. | 600 // 1. Chrome is restarted after crash. |
| 601 // 2. Chrome is started in browser_tests skipping the login flow | 601 // 2. Chrome is started in browser_tests skipping the login flow |
| 602 // 3. Chrome is started on dev machine | 602 // 3. Chrome is started on dev machine |
| 603 // i.e. not on Chrome OS device w/o login flow. | 603 // i.e. not on Chrome OS device w/o login flow. |
| 604 if (parsed_command_line().HasSwitch(switches::kLoginUser) && | 604 if (parsed_command_line().HasSwitch(switches::kLoginUser) && |
| 605 !parsed_command_line().HasSwitch(switches::kLoginPassword)) { | 605 !parsed_command_line().HasSwitch(switches::kLoginPassword)) { |
| 606 // Make sure we flip every profile to not share proxies if the user hasn't | |
| 607 // specified so explicitly. | |
| 608 const PrefService::Preference* use_shared_proxies_pref = | |
| 609 profile()->GetPrefs()->FindPreference(prefs::kUseSharedProxies); | |
| 610 if (use_shared_proxies_pref->IsDefaultValue()) | |
| 611 profile()->GetPrefs()->SetBoolean(prefs::kUseSharedProxies, false); | |
| 612 | |
| 613 // This is done in LoginUtils::OnProfileCreated during normal login. | 606 // This is done in LoginUtils::OnProfileCreated during normal login. |
| 614 LoginUtils::Get()->InitRlzDelayed(profile()); | 607 LoginUtils::Get()->InitRlzDelayed(profile()); |
| 615 | 608 |
| 616 // Send the PROFILE_PREPARED notification and call SessionStarted() | 609 // Send the PROFILE_PREPARED notification and call SessionStarted() |
| 617 // so that the Launcher and other Profile dependent classes are created. | 610 // so that the Launcher and other Profile dependent classes are created. |
| 618 content::NotificationService::current()->Notify( | 611 content::NotificationService::current()->Notify( |
| 619 chrome::NOTIFICATION_LOGIN_USER_PROFILE_PREPARED, | 612 chrome::NOTIFICATION_LOGIN_USER_PROFILE_PREPARED, |
| 620 content::NotificationService::AllSources(), | 613 content::NotificationService::AllSources(), |
| 621 content::Details<Profile>(profile())); | 614 content::Details<Profile>(profile())); |
| 622 UserManager::Get()->SessionStarted(); | 615 UserManager::Get()->SessionStarted(); |
| (...skipping 228 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 851 ChromeBrowserMainPartsLinux::PostDestroyThreads(); | 844 ChromeBrowserMainPartsLinux::PostDestroyThreads(); |
| 852 // Destroy DeviceSettingsService after g_browser_process. | 845 // Destroy DeviceSettingsService after g_browser_process. |
| 853 DeviceSettingsService::Shutdown(); | 846 DeviceSettingsService::Shutdown(); |
| 854 } | 847 } |
| 855 | 848 |
| 856 void ChromeBrowserMainPartsChromeos::SetupPlatformFieldTrials() { | 849 void ChromeBrowserMainPartsChromeos::SetupPlatformFieldTrials() { |
| 857 default_pinned_apps_field_trial::SetupTrial(); | 850 default_pinned_apps_field_trial::SetupTrial(); |
| 858 } | 851 } |
| 859 | 852 |
| 860 } // namespace chromeos | 853 } // namespace chromeos |
| OLD | NEW |