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/chromeos/login/login_utils.h" | 5 #include "chrome/browser/chromeos/login/login_utils.h" |
6 | 6 |
7 #include <vector> | 7 #include <vector> |
8 | 8 |
9 #include "base/command_line.h" | 9 #include "base/command_line.h" |
10 #include "base/compiler_specific.h" | 10 #include "base/compiler_specific.h" |
(...skipping 762 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
773 } | 773 } |
774 | 774 |
775 void LoginUtilsImpl::CompleteOffTheRecordLogin(const GURL& start_url) { | 775 void LoginUtilsImpl::CompleteOffTheRecordLogin(const GURL& start_url) { |
776 VLOG(1) << "Completing incognito login"; | 776 VLOG(1) << "Completing incognito login"; |
777 | 777 |
778 UserManager::Get()->OffTheRecordUserLoggedIn(); | 778 UserManager::Get()->OffTheRecordUserLoggedIn(); |
779 | 779 |
780 if (CrosLibrary::Get()->EnsureLoaded()) { | 780 if (CrosLibrary::Get()->EnsureLoaded()) { |
781 // Session Manager may kill the chrome anytime after this point. | 781 // Session Manager may kill the chrome anytime after this point. |
782 // Write exit_cleanly and other stuff to the disk here. | 782 // Write exit_cleanly and other stuff to the disk here. |
| 783 // NOTE: If you want/need to change this, please update the comment |
| 784 // in chrome/browser/ui/browser_list.cc that describes shutdown process. |
783 g_browser_process->EndSession(); | 785 g_browser_process->EndSession(); |
784 | 786 |
785 // For guest session we ask session manager to restart Chrome with --bwsi | 787 // For guest session we ask session manager to restart Chrome with --bwsi |
786 // flag. We keep only some of the arguments of this process. | 788 // flag. We keep only some of the arguments of this process. |
787 const CommandLine& browser_command_line = *CommandLine::ForCurrentProcess(); | 789 const CommandLine& browser_command_line = *CommandLine::ForCurrentProcess(); |
788 CommandLine command_line(browser_command_line.GetProgram()); | 790 CommandLine command_line(browser_command_line.GetProgram()); |
789 std::string cmd_line_str = | 791 std::string cmd_line_str = |
790 GetOffTheRecordCommandLine(start_url, | 792 GetOffTheRecordCommandLine(start_url, |
791 browser_command_line, | 793 browser_command_line, |
792 &command_line); | 794 &command_line); |
(...skipping 370 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1163 // Mark login host for deletion after browser starts. This | 1165 // Mark login host for deletion after browser starts. This |
1164 // guarantees that the message loop will be referenced by the | 1166 // guarantees that the message loop will be referenced by the |
1165 // browser before it is dereferenced by the login host. | 1167 // browser before it is dereferenced by the login host. |
1166 if (login_host) { | 1168 if (login_host) { |
1167 login_host->OnSessionStart(); | 1169 login_host->OnSessionStart(); |
1168 login_host = NULL; | 1170 login_host = NULL; |
1169 } | 1171 } |
1170 } | 1172 } |
1171 | 1173 |
1172 } // namespace chromeos | 1174 } // namespace chromeos |
OLD | NEW |