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

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

Issue 10752020: [MIPS] Set endianness for MIPS architecture in http_auth_handler_ntlm_portable. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Wrap a long line. Created 8 years, 5 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
« no previous file with comments | « no previous file | 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) 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 #include <stdlib.h> 7 #include <stdlib.h>
8 // For gethostname 8 // For gethostname
9 #if defined(OS_POSIX) 9 #if defined(OS_POSIX)
10 #include <unistd.h> 10 #include <unistd.h>
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after
64 * under the terms of either the GPL or the LGPL, and not to allow others to 64 * under the terms of either the GPL or the LGPL, and not to allow others to
65 * use your version of this file under the terms of the MPL, indicate your 65 * use your version of this file under the terms of the MPL, indicate your
66 * decision by deleting the provisions above and replace them with the notice 66 * decision by deleting the provisions above and replace them with the notice
67 * and other provisions required by the GPL or the LGPL. If you do not delete 67 * and other provisions required by the GPL or the LGPL. If you do not delete
68 * the provisions above, a recipient may use your version of this file under 68 * the provisions above, a recipient may use your version of this file under
69 * the terms of any one of the MPL, the GPL or the LGPL. 69 * the terms of any one of the MPL, the GPL or the LGPL.
70 * 70 *
71 * ***** END LICENSE BLOCK ***** */ 71 * ***** END LICENSE BLOCK ***** */
72 72
73 // Discover the endianness by testing processor architecture. 73 // Discover the endianness by testing processor architecture.
74 #if defined(ARCH_CPU_X86) || defined(ARCH_CPU_X86_64) || defined(ARCH_CPU_ARMEL) 74 #if defined(ARCH_CPU_X86) || defined(ARCH_CPU_X86_64)\
75 || defined(ARCH_CPU_ARMEL) || defined(ARCH_CPU_MIPSEL)
75 #define IS_LITTLE_ENDIAN 1 76 #define IS_LITTLE_ENDIAN 1
76 #undef IS_BIG_ENDIAN 77 #undef IS_BIG_ENDIAN
78 #elif defined(ARCH_CPU_MIPSEB)
79 #define IS_BIG_ENDIAN 1
80 #undef IS_LITTLE_ENDIAN
77 #else 81 #else
78 #error "Unknown endianness" 82 #error "Unknown endianness"
79 #endif 83 #endif
80 84
81 #define NTLM_LOG(x) ((void) 0) 85 #define NTLM_LOG(x) ((void) 0)
82 86
83 //----------------------------------------------------------------------------- 87 //-----------------------------------------------------------------------------
84 // This file contains a cross-platform NTLM authentication implementation. It 88 // This file contains a cross-platform NTLM authentication implementation. It
85 // is based on documentation from: http://davenport.sourceforge.net/ntlm.html 89 // is based on documentation from: http://davenport.sourceforge.net/ntlm.html
86 //----------------------------------------------------------------------------- 90 //-----------------------------------------------------------------------------
(...skipping 630 matching lines...) Expand 10 before | Expand all | Expand 10 after
717 // NOTE: Default credentials are not supported for the portable implementation 721 // NOTE: Default credentials are not supported for the portable implementation
718 // of NTLM. 722 // of NTLM.
719 scoped_ptr<HttpAuthHandler> tmp_handler(new HttpAuthHandlerNTLM); 723 scoped_ptr<HttpAuthHandler> tmp_handler(new HttpAuthHandlerNTLM);
720 if (!tmp_handler->InitFromChallenge(challenge, target, origin, net_log)) 724 if (!tmp_handler->InitFromChallenge(challenge, target, origin, net_log))
721 return ERR_INVALID_RESPONSE; 725 return ERR_INVALID_RESPONSE;
722 handler->swap(tmp_handler); 726 handler->swap(tmp_handler);
723 return OK; 727 return OK;
724 } 728 }
725 729
726 } // namespace net 730 } // namespace net
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698