Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(195)

Side by Side Diff: net/base/auth.h

Issue 1528012: Notify all active login prompts when one login prompt is submitted. This allo... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 10 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « chrome/common/notification_type.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2006-2008 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 #ifndef NET_BASE_AUTH_H__ 5 #ifndef NET_BASE_AUTH_H__
6 #define NET_BASE_AUTH_H__ 6 #define NET_BASE_AUTH_H__
7 7
8 #include <string> 8 #include <string>
9 9
10 #include "base/ref_counted.h" 10 #include "base/ref_counted.h"
11 11
12 namespace net { 12 namespace net {
13 13
14 // Holds info about an authentication challenge that we may want to display 14 // Holds info about an authentication challenge that we may want to display
15 // to the user. 15 // to the user.
16 class AuthChallengeInfo : 16 class AuthChallengeInfo :
17 public base::RefCountedThreadSafe<AuthChallengeInfo> { 17 public base::RefCountedThreadSafe<AuthChallengeInfo> {
18 public: 18 public:
19 bool operator==(const AuthChallengeInfo& that) const {
20 return (this->is_proxy == that.is_proxy &&
21 this->host_and_port == that.host_and_port &&
22 this->scheme == that.scheme &&
23 this->realm == that.realm);
24 }
25
26 bool operator!=(const AuthChallengeInfo& that) const {
27 return !(*this == that);
28 }
29
19 bool is_proxy; // true for Proxy-Authenticate, false for WWW-Authenticate. 30 bool is_proxy; // true for Proxy-Authenticate, false for WWW-Authenticate.
20 std::wstring host_and_port; // <host>:<port> of the server asking for auth 31 std::wstring host_and_port; // <host>:<port> of the server asking for auth
21 // (could be the proxy). 32 // (could be the proxy).
22 std::wstring scheme; // "Basic", "Digest", or whatever other method is used. 33 std::wstring scheme; // "Basic", "Digest", or whatever other method is used.
23 std::wstring realm; // the realm provided by the server, if there is one. 34 std::wstring realm; // the realm provided by the server, if there is one.
24 35
25 private: 36 private:
26 friend class base::RefCountedThreadSafe<AuthChallengeInfo>; 37 friend class base::RefCountedThreadSafe<AuthChallengeInfo>;
27 ~AuthChallengeInfo() {} 38 ~AuthChallengeInfo() {}
28 }; 39 };
(...skipping 17 matching lines...) Expand all
46 AuthData() : state(AUTH_STATE_NEED_AUTH) {} 57 AuthData() : state(AUTH_STATE_NEED_AUTH) {}
47 58
48 private: 59 private:
49 friend class base::RefCountedThreadSafe<AuthData>; 60 friend class base::RefCountedThreadSafe<AuthData>;
50 ~AuthData() {} 61 ~AuthData() {}
51 }; 62 };
52 63
53 } // namespace net 64 } // namespace net
54 65
55 #endif // NET_BASE_AUTH_H__ 66 #endif // NET_BASE_AUTH_H__
OLDNEW
« no previous file with comments | « chrome/common/notification_type.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698