Bug 1885993 - Enable the BackupService initializer on Nightly by default. r=backup...
[gecko.git] / netwerk / base / nsAuthInformationHolder.cpp
blob11cf7626cef26ba5aa46b154c8ece4742ca568b8
1 /* This Source Code Form is subject to the terms of the Mozilla Public
2 * License, v. 2.0. If a copy of the MPL was not distributed with this
3 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
5 #include "nsAuthInformationHolder.h"
7 NS_IMPL_ISUPPORTS(nsAuthInformationHolder, nsIAuthInformation)
9 NS_IMETHODIMP
10 nsAuthInformationHolder::GetFlags(uint32_t* aFlags) {
11 *aFlags = mFlags;
12 return NS_OK;
15 NS_IMETHODIMP
16 nsAuthInformationHolder::GetRealm(nsAString& aRealm) {
17 aRealm = mRealm;
18 return NS_OK;
21 NS_IMETHODIMP
22 nsAuthInformationHolder::GetAuthenticationScheme(nsACString& aScheme) {
23 aScheme = mAuthType;
24 return NS_OK;
27 NS_IMETHODIMP
28 nsAuthInformationHolder::GetUsername(nsAString& aUserName) {
29 aUserName = mUser;
30 return NS_OK;
33 NS_IMETHODIMP
34 nsAuthInformationHolder::SetUsername(const nsAString& aUserName) {
35 if (!(mFlags & ONLY_PASSWORD)) mUser = aUserName;
36 return NS_OK;
39 NS_IMETHODIMP
40 nsAuthInformationHolder::GetPassword(nsAString& aPassword) {
41 aPassword = mPassword;
42 return NS_OK;
45 NS_IMETHODIMP
46 nsAuthInformationHolder::SetPassword(const nsAString& aPassword) {
47 mPassword = aPassword;
48 return NS_OK;
51 NS_IMETHODIMP
52 nsAuthInformationHolder::GetDomain(nsAString& aDomain) {
53 aDomain = mDomain;
54 return NS_OK;
57 NS_IMETHODIMP
58 nsAuthInformationHolder::SetDomain(const nsAString& aDomain) {
59 if (mFlags & NEED_DOMAIN) mDomain = aDomain;
60 return NS_OK;