Wed, 31 Dec 2014 06:09:35 +0100
Cloned upstream origin tor-browser at tor-browser-31.3.0esr-4.5-1-build1
revision ID fc1c9ff7c1b2defdbc039f12214767608f46423f for hacking purpose.
michael@0 | 1 | /* This Source Code Form is subject to the terms of the Mozilla Public |
michael@0 | 2 | * License, v. 2.0. If a copy of the MPL was not distributed with this |
michael@0 | 3 | * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ |
michael@0 | 4 | |
michael@0 | 5 | |
michael@0 | 6 | #ifndef NSAUTHINFORMATIONHOLDER_H_ |
michael@0 | 7 | #define NSAUTHINFORMATIONHOLDER_H_ |
michael@0 | 8 | |
michael@0 | 9 | #include "nsIAuthInformation.h" |
michael@0 | 10 | #include "nsString.h" |
michael@0 | 11 | |
michael@0 | 12 | class nsAuthInformationHolder : public nsIAuthInformation { |
michael@0 | 13 | public: |
michael@0 | 14 | // aAuthType must be ASCII |
michael@0 | 15 | nsAuthInformationHolder(uint32_t aFlags, const nsString& aRealm, |
michael@0 | 16 | const nsCString& aAuthType) |
michael@0 | 17 | : mFlags(aFlags), mRealm(aRealm), mAuthType(aAuthType) {} |
michael@0 | 18 | |
michael@0 | 19 | virtual ~nsAuthInformationHolder() {} |
michael@0 | 20 | |
michael@0 | 21 | NS_DECL_ISUPPORTS |
michael@0 | 22 | NS_DECL_NSIAUTHINFORMATION |
michael@0 | 23 | |
michael@0 | 24 | const nsString& User() const { return mUser; } |
michael@0 | 25 | const nsString& Password() const { return mPassword; } |
michael@0 | 26 | const nsString& Domain() const { return mDomain; } |
michael@0 | 27 | |
michael@0 | 28 | /** |
michael@0 | 29 | * This method can be used to initialize the username when the |
michael@0 | 30 | * ONLY_PASSWORD flag is set. |
michael@0 | 31 | */ |
michael@0 | 32 | void SetUserInternal(const nsString& aUsername) { |
michael@0 | 33 | mUser = aUsername; |
michael@0 | 34 | } |
michael@0 | 35 | private: |
michael@0 | 36 | nsString mUser; |
michael@0 | 37 | nsString mPassword; |
michael@0 | 38 | nsString mDomain; |
michael@0 | 39 | |
michael@0 | 40 | uint32_t mFlags; |
michael@0 | 41 | nsString mRealm; |
michael@0 | 42 | nsCString mAuthType; |
michael@0 | 43 | }; |
michael@0 | 44 | |
michael@0 | 45 | |
michael@0 | 46 | #endif |