OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 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/login/fake_login_utils.h" | 5 #include "chrome/browser/chromeos/login/fake_login_utils.h" |
6 | 6 |
7 #include "base/callback.h" | 7 #include "base/callback.h" |
8 #include "base/command_line.h" | 8 #include "base/command_line.h" |
9 #include "base/prefs/pref_service.h" | 9 #include "base/prefs/pref_service.h" |
10 #include "chrome/browser/chrome_notification_types.h" | 10 #include "chrome/browser/chrome_notification_types.h" |
(...skipping 13 matching lines...) Expand all Loading... |
24 #include "components/user_manager/user_manager.h" | 24 #include "components/user_manager/user_manager.h" |
25 #include "content/public/browser/notification_service.h" | 25 #include "content/public/browser/notification_service.h" |
26 #include "testing/gtest/include/gtest/gtest.h" | 26 #include "testing/gtest/include/gtest/gtest.h" |
27 | 27 |
28 namespace chromeos { | 28 namespace chromeos { |
29 | 29 |
30 FakeLoginUtils::FakeLoginUtils() : should_launch_browser_(false) {} | 30 FakeLoginUtils::FakeLoginUtils() : should_launch_browser_(false) {} |
31 | 31 |
32 FakeLoginUtils::~FakeLoginUtils() {} | 32 FakeLoginUtils::~FakeLoginUtils() {} |
33 | 33 |
34 void FakeLoginUtils::RespectLocalePreference(Profile*, | |
35 const base::Closure& callback) { | |
36 callback.Run(); | |
37 } | |
38 | |
39 void FakeLoginUtils::DoBrowserLaunch(Profile* profile, | 34 void FakeLoginUtils::DoBrowserLaunch(Profile* profile, |
40 LoginDisplayHost* login_host) { | 35 LoginDisplayHost* login_host) { |
41 if (!ChromeUserManager::Get()->GetCurrentUserFlow()->ShouldLaunchBrowser()) { | 36 if (!ChromeUserManager::Get()->GetCurrentUserFlow()->ShouldLaunchBrowser()) { |
42 ChromeUserManager::Get()->GetCurrentUserFlow()->LaunchExtraSteps(profile); | 37 ChromeUserManager::Get()->GetCurrentUserFlow()->LaunchExtraSteps(profile); |
43 return; | 38 return; |
44 } | 39 } |
45 login_host->BeforeSessionStart(); | 40 login_host->BeforeSessionStart(); |
46 if (should_launch_browser_) { | 41 if (should_launch_browser_) { |
47 StartupBrowserCreator browser_creator; | 42 StartupBrowserCreator browser_creator; |
48 chrome::startup::IsFirstRun first_run = | 43 chrome::startup::IsFirstRun first_run = |
(...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
120 | 115 |
121 void FakeLoginUtils::SetExpectedCredentials(const UserContext& user_context) { | 116 void FakeLoginUtils::SetExpectedCredentials(const UserContext& user_context) { |
122 expected_user_context_ = user_context; | 117 expected_user_context_ = user_context; |
123 if (authenticator_.get()) { | 118 if (authenticator_.get()) { |
124 static_cast<MockAuthenticator*>(authenticator_.get())-> | 119 static_cast<MockAuthenticator*>(authenticator_.get())-> |
125 SetExpectedCredentials(user_context); | 120 SetExpectedCredentials(user_context); |
126 } | 121 } |
127 } | 122 } |
128 | 123 |
129 } // namespace chromeos | 124 } // namespace chromeos |
OLD | NEW |