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

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

Issue 3040016: Net: Convert username and password to string16. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: address comments Created 10 years, 4 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/browser/login_prompt.cc ('k') | net/base/net_util.h » ('j') | 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) 2010 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 #pragma once 7 #pragma once
8 8
9 #include <string> 9 #include <string>
10 10
11 #include "base/ref_counted.h" 11 #include "base/ref_counted.h"
12 #include "base/string16.h"
12 13
13 namespace net { 14 namespace net {
14 15
15 // Holds info about an authentication challenge that we may want to display 16 // Holds info about an authentication challenge that we may want to display
16 // to the user. 17 // to the user.
17 class AuthChallengeInfo : 18 class AuthChallengeInfo :
18 public base::RefCountedThreadSafe<AuthChallengeInfo> { 19 public base::RefCountedThreadSafe<AuthChallengeInfo> {
19 public: 20 public:
20 bool operator==(const AuthChallengeInfo& that) const { 21 bool operator==(const AuthChallengeInfo& that) const {
21 return (this->is_proxy == that.is_proxy && 22 return (this->is_proxy == that.is_proxy &&
(...skipping 22 matching lines...) Expand all
44 AUTH_STATE_DONT_NEED_AUTH, 45 AUTH_STATE_DONT_NEED_AUTH,
45 AUTH_STATE_NEED_AUTH, 46 AUTH_STATE_NEED_AUTH,
46 AUTH_STATE_HAVE_AUTH, 47 AUTH_STATE_HAVE_AUTH,
47 AUTH_STATE_CANCELED 48 AUTH_STATE_CANCELED
48 }; 49 };
49 50
50 class AuthData : public base::RefCountedThreadSafe<AuthData> { 51 class AuthData : public base::RefCountedThreadSafe<AuthData> {
51 public: 52 public:
52 AuthState state; // whether we need, have, or gave up on authentication. 53 AuthState state; // whether we need, have, or gave up on authentication.
53 std::wstring scheme; // the authentication scheme. 54 std::wstring scheme; // the authentication scheme.
54 std::wstring username; // the username supplied to us for auth. 55 string16 username; // the username supplied to us for auth.
55 std::wstring password; // the password supplied to us for auth. 56 string16 password; // the password supplied to us for auth.
56 57
57 // We wouldn't instantiate this class if we didn't need authentication. 58 // We wouldn't instantiate this class if we didn't need authentication.
58 AuthData() : state(AUTH_STATE_NEED_AUTH) {} 59 AuthData() : state(AUTH_STATE_NEED_AUTH) {}
59 60
60 private: 61 private:
61 friend class base::RefCountedThreadSafe<AuthData>; 62 friend class base::RefCountedThreadSafe<AuthData>;
62 ~AuthData() {} 63 ~AuthData() {}
63 }; 64 };
64 65
65 } // namespace net 66 } // namespace net
66 67
67 #endif // NET_BASE_AUTH_H__ 68 #endif // NET_BASE_AUTH_H__
OLDNEW
« no previous file with comments | « chrome/browser/login_prompt.cc ('k') | net/base/net_util.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698