| 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 572 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 583 // -- This used to be in ChromeBrowserMainParts::PreMainMessageLoopRun() | 583 // -- This used to be in ChromeBrowserMainParts::PreMainMessageLoopRun() |
| 584 // -- just after CreateProfile(). | 584 // -- just after CreateProfile(). |
| 585 | 585 |
| 586 // Restarting Chrome inside existing user session. Possible cases: | 586 // Restarting Chrome inside existing user session. Possible cases: |
| 587 // 1. Chrome is restarted after crash. | 587 // 1. Chrome is restarted after crash. |
| 588 // 2. Chrome is started in browser_tests skipping the login flow | 588 // 2. Chrome is started in browser_tests skipping the login flow |
| 589 // 3. Chrome is started on dev machine | 589 // 3. Chrome is started on dev machine |
| 590 // i.e. not on Chrome OS device w/o login flow. | 590 // i.e. not on Chrome OS device w/o login flow. |
| 591 if (parsed_command_line().HasSwitch(switches::kLoginUser) && | 591 if (parsed_command_line().HasSwitch(switches::kLoginUser) && |
| 592 !parsed_command_line().HasSwitch(switches::kLoginPassword)) { | 592 !parsed_command_line().HasSwitch(switches::kLoginPassword)) { |
| 593 // Make sure we flip every profile to not share proxies if the user hasn't | |
| 594 // specified so explicitly. | |
| 595 const PrefService::Preference* use_shared_proxies_pref = | |
| 596 profile()->GetPrefs()->FindPreference(prefs::kUseSharedProxies); | |
| 597 if (use_shared_proxies_pref->IsDefaultValue()) | |
| 598 profile()->GetPrefs()->SetBoolean(prefs::kUseSharedProxies, false); | |
| 599 | |
| 600 // This is done in LoginUtils::OnProfileCreated during normal login. | 593 // This is done in LoginUtils::OnProfileCreated during normal login. |
| 601 LoginUtils::Get()->InitRlzDelayed(profile()); | 594 LoginUtils::Get()->InitRlzDelayed(profile()); |
| 602 | 595 |
| 603 // Send the PROFILE_PREPARED notification and call SessionStarted() | 596 // Send the PROFILE_PREPARED notification and call SessionStarted() |
| 604 // so that the Launcher and other Profile dependent classes are created. | 597 // so that the Launcher and other Profile dependent classes are created. |
| 605 content::NotificationService::current()->Notify( | 598 content::NotificationService::current()->Notify( |
| 606 chrome::NOTIFICATION_LOGIN_USER_PROFILE_PREPARED, | 599 chrome::NOTIFICATION_LOGIN_USER_PROFILE_PREPARED, |
| 607 content::NotificationService::AllSources(), | 600 content::NotificationService::AllSources(), |
| 608 content::Details<Profile>(profile())); | 601 content::Details<Profile>(profile())); |
| 609 UserManager::Get()->SessionStarted(); | 602 UserManager::Get()->SessionStarted(); |
| (...skipping 225 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 835 ChromeBrowserMainPartsLinux::PostDestroyThreads(); | 828 ChromeBrowserMainPartsLinux::PostDestroyThreads(); |
| 836 // Destroy DeviceSettingsService after g_browser_process. | 829 // Destroy DeviceSettingsService after g_browser_process. |
| 837 DeviceSettingsService::Shutdown(); | 830 DeviceSettingsService::Shutdown(); |
| 838 } | 831 } |
| 839 | 832 |
| 840 void ChromeBrowserMainPartsChromeos::SetupPlatformFieldTrials() { | 833 void ChromeBrowserMainPartsChromeos::SetupPlatformFieldTrials() { |
| 841 default_pinned_apps_field_trial::SetupTrial(); | 834 default_pinned_apps_field_trial::SetupTrial(); |
| 842 } | 835 } |
| 843 | 836 |
| 844 } // namespace chromeos | 837 } // namespace chromeos |
| OLD | NEW |