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

Side by Side Diff: net/http/http_auth_handler_ntlm.cc

Issue 1535363003: Switch to standard integer types in net/. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: stddef Created 5 years 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
« no previous file with comments | « net/http/http_auth_handler_ntlm.h ('k') | net/http/http_auth_handler_ntlm_portable.cc » ('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) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 "net/http/http_auth_handler_ntlm.h" 5 #include "net/http/http_auth_handler_ntlm.h"
6 6
7 #if !defined(NTLM_SSPI) 7 #if !defined(NTLM_SSPI)
8 #include "base/base64.h" 8 #include "base/base64.h"
9 #endif 9 #endif
10 #include "base/logging.h" 10 #include "base/logging.h"
(...skipping 29 matching lines...) Expand all
40 // TODO(cbentzel): Shouldn't be hitting this case. 40 // TODO(cbentzel): Shouldn't be hitting this case.
41 if (!credentials) { 41 if (!credentials) {
42 LOG(ERROR) << "Username and password are expected to be non-NULL."; 42 LOG(ERROR) << "Username and password are expected to be non-NULL.";
43 return ERR_MISSING_AUTH_CREDENTIALS; 43 return ERR_MISSING_AUTH_CREDENTIALS;
44 } 44 }
45 // TODO(wtc): See if we can use char* instead of void* for in_buf and 45 // TODO(wtc): See if we can use char* instead of void* for in_buf and
46 // out_buf. This change will need to propagate to GetNextToken, 46 // out_buf. This change will need to propagate to GetNextToken,
47 // GenerateType1Msg, and GenerateType3Msg, and perhaps further. 47 // GenerateType1Msg, and GenerateType3Msg, and perhaps further.
48 const void* in_buf; 48 const void* in_buf;
49 void* out_buf; 49 void* out_buf;
50 uint32 in_buf_len, out_buf_len; 50 uint32_t in_buf_len, out_buf_len;
51 std::string decoded_auth_data; 51 std::string decoded_auth_data;
52 52
53 // The username may be in the form "DOMAIN\user". Parse it into the two 53 // The username may be in the form "DOMAIN\user". Parse it into the two
54 // components. 54 // components.
55 base::string16 domain; 55 base::string16 domain;
56 base::string16 user; 56 base::string16 user;
57 const base::string16& username = credentials->username(); 57 const base::string16& username = credentials->username();
58 const base::char16 backslash_character = '\\'; 58 const base::char16 backslash_character = '\\';
59 size_t backslash_idx = username.find(backslash_character); 59 size_t backslash_idx = username.find(backslash_character);
60 if (backslash_idx == base::string16::npos) { 60 if (backslash_idx == base::string16::npos) {
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after
134 // static 134 // static
135 std::string HttpAuthHandlerNTLM::CreateSPN(const GURL& origin) { 135 std::string HttpAuthHandlerNTLM::CreateSPN(const GURL& origin) {
136 // The service principal name of the destination server. See 136 // The service principal name of the destination server. See
137 // http://msdn.microsoft.com/en-us/library/ms677949%28VS.85%29.aspx 137 // http://msdn.microsoft.com/en-us/library/ms677949%28VS.85%29.aspx
138 std::string target("HTTP/"); 138 std::string target("HTTP/");
139 target.append(GetHostAndPort(origin)); 139 target.append(GetHostAndPort(origin));
140 return target; 140 return target;
141 } 141 }
142 142
143 } // namespace net 143 } // namespace net
OLDNEW
« no previous file with comments | « net/http/http_auth_handler_ntlm.h ('k') | net/http/http_auth_handler_ntlm_portable.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698