| 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/command_line.h" | 7 #include "base/command_line.h" |
| 8 #include "base/path_service.h" | 8 #include "base/path_service.h" |
| 9 #include "base/prefs/pref_service.h" | 9 #include "base/prefs/pref_service.h" |
| 10 #include "chrome/browser/browser_process.h" | 10 #include "chrome/browser/browser_process.h" |
| (...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 102 } | 102 } |
| 103 | 103 |
| 104 void FakeLoginUtils::RestoreAuthenticationSession(Profile* profile) { | 104 void FakeLoginUtils::RestoreAuthenticationSession(Profile* profile) { |
| 105 NOTREACHED() << "Method not implemented."; | 105 NOTREACHED() << "Method not implemented."; |
| 106 } | 106 } |
| 107 | 107 |
| 108 void FakeLoginUtils::InitRlzDelayed(Profile* user_profile) { | 108 void FakeLoginUtils::InitRlzDelayed(Profile* user_profile) { |
| 109 NOTREACHED() << "Method not implemented."; | 109 NOTREACHED() << "Method not implemented."; |
| 110 } | 110 } |
| 111 | 111 |
| 112 void FakeLoginUtils::StartCertLoader(Profile* user_profile) { | 112 void FakeLoginUtils::InitNSSCertDatabaseUsers(Profile* user_profile) { |
| 113 NOTREACHED() << "Method not implemented."; | 113 NOTREACHED() << "Method not implemented."; |
| 114 } | 114 } |
| 115 | 115 |
| 116 Profile* FakeLoginUtils::CreateProfile(const std::string& username_hash) { | 116 Profile* FakeLoginUtils::CreateProfile(const std::string& username_hash) { |
| 117 base::FilePath path; | 117 base::FilePath path; |
| 118 PathService::Get(chrome::DIR_USER_DATA, &path); | 118 PathService::Get(chrome::DIR_USER_DATA, &path); |
| 119 path = path.AppendASCII(chrome::kProfileDirPrefix + username_hash); | 119 path = path.AppendASCII(chrome::kProfileDirPrefix + username_hash); |
| 120 Profile* profile = g_browser_process->profile_manager()->GetProfile(path); | 120 Profile* profile = g_browser_process->profile_manager()->GetProfile(path); |
| 121 return profile; | 121 return profile; |
| 122 } | 122 } |
| 123 | 123 |
| 124 void FakeLoginUtils::SetExpectedCredentials(const std::string& username, | 124 void FakeLoginUtils::SetExpectedCredentials(const std::string& username, |
| 125 const std::string& password) { | 125 const std::string& password) { |
| 126 expected_username_ = username; | 126 expected_username_ = username; |
| 127 expected_password_ = password; | 127 expected_password_ = password; |
| 128 if (authenticator_.get()) { | 128 if (authenticator_.get()) { |
| 129 static_cast<MockAuthenticator*>(authenticator_.get())-> | 129 static_cast<MockAuthenticator*>(authenticator_.get())-> |
| 130 SetExpectedCredentials(username, password); | 130 SetExpectedCredentials(username, password); |
| 131 } | 131 } |
| 132 } | 132 } |
| 133 | 133 |
| 134 } // namespace chromeos | 134 } // namespace chromeos |
| OLD | NEW |