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/chromeos/login/utils.h" | 5 #include "chrome/browser/chromeos/login/utils.h" |
6 | 6 |
7 #include "base/command_line.h" | 7 #include "base/command_line.h" |
8 #include "base/file_path.h" | 8 #include "base/file_path.h" |
9 #include "base/path_service.h" | 9 #include "base/path_service.h" |
10 #include "chrome/browser/browser_init.h" | 10 #include "chrome/browser/browser_init.h" |
(...skipping 16 matching lines...) Expand all Loading... |
27 #include "views/widget/widget_gtk.h" | 27 #include "views/widget/widget_gtk.h" |
28 | 28 |
29 namespace chromeos { | 29 namespace chromeos { |
30 | 30 |
31 namespace login_utils { | 31 namespace login_utils { |
32 | 32 |
33 void CompleteLogin(const std::string& username, | 33 void CompleteLogin(const std::string& username, |
34 std::vector<std::string> cookies) { | 34 std::vector<std::string> cookies) { |
35 LOG(INFO) << "LoginManagerView: OnLoginSuccess()"; | 35 LOG(INFO) << "LoginManagerView: OnLoginSuccess()"; |
36 | 36 |
37 if (CrosLibrary::EnsureLoaded()) | 37 if (CrosLibrary::Get()->EnsureLoaded()) |
38 LoginLibrary::Get()->StartSession(username, ""); | 38 CrosLibrary::Get()->GetLoginLibrary()->StartSession(username, ""); |
39 | 39 |
40 UserManager::Get()->UserLoggedIn(username); | 40 UserManager::Get()->UserLoggedIn(username); |
41 | 41 |
42 // Send notification of success | 42 // Send notification of success |
43 AuthenticationNotificationDetails details(true); | 43 AuthenticationNotificationDetails details(true); |
44 NotificationService::current()->Notify( | 44 NotificationService::current()->Notify( |
45 NotificationType::LOGIN_AUTHENTICATION, | 45 NotificationType::LOGIN_AUTHENTICATION, |
46 NotificationService::AllSources(), | 46 NotificationService::AllSources(), |
47 Details<AuthenticationNotificationDetails>(&details)); | 47 Details<AuthenticationNotificationDetails>(&details)); |
48 | 48 |
(...skipping 23 matching lines...) Expand all Loading... |
72 | 72 |
73 Authenticator* CreateAuthenticator(LoginStatusConsumer* consumer) { | 73 Authenticator* CreateAuthenticator(LoginStatusConsumer* consumer) { |
74 if (CommandLine::ForCurrentProcess()->HasSwitch(switches::kInChromeAuth)) | 74 if (CommandLine::ForCurrentProcess()->HasSwitch(switches::kInChromeAuth)) |
75 return new GoogleAuthenticator(consumer); | 75 return new GoogleAuthenticator(consumer); |
76 return new PamGoogleAuthenticator(consumer); | 76 return new PamGoogleAuthenticator(consumer); |
77 } | 77 } |
78 | 78 |
79 } // namespace login_utils | 79 } // namespace login_utils |
80 | 80 |
81 } // namespace chromeos | 81 } // namespace chromeos |
OLD | NEW |