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

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

Issue 6339012: More net/ method ordering. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: More done while waiting for previous patch to clear Created 9 years, 11 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 | « net/http/mock_gssapi_library_posix.h ('k') | net/proxy/proxy_list.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) 2010 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 #include "net/http/mock_gssapi_library_posix.h" 5 #include "net/http/mock_gssapi_library_posix.h"
6 6
7 #include "base/logging.h" 7 #include "base/logging.h"
8 #include "base/string_util.h" 8 #include "base/string_util.h"
9 #include "base/stringprintf.h" 9 #include "base/stringprintf.h"
10 #include "net/third_party/gssapi/gssapi.h" 10 #include "net/third_party/gssapi/gssapi.h"
(...skipping 176 matching lines...) Expand 10 before | Expand all | Expand 10 after
187 locally_initiated = other.locally_initiated; 187 locally_initiated = other.locally_initiated;
188 open = other.open; 188 open = other.open;
189 } 189 }
190 190
191 MockGSSAPILibrary::MockGSSAPILibrary() { 191 MockGSSAPILibrary::MockGSSAPILibrary() {
192 } 192 }
193 193
194 MockGSSAPILibrary::~MockGSSAPILibrary() { 194 MockGSSAPILibrary::~MockGSSAPILibrary() {
195 } 195 }
196 196
197 void MockGSSAPILibrary::ExpectSecurityContext(
198 const std::string& expected_package,
199 OM_uint32 response_code,
200 OM_uint32 minor_response_code,
201 const GssContextMockImpl& context_info,
202 const gss_buffer_desc& expected_input_token,
203 const gss_buffer_desc& output_token) {
204 SecurityContextQuery security_query;
205 security_query.expected_package = expected_package;
206 security_query.response_code = response_code;
207 security_query.minor_response_code = minor_response_code;
208 security_query.context_info.Assign(context_info);
209 security_query.expected_input_token = expected_input_token;
210 security_query.output_token = output_token;
211 expected_security_queries_.push_back(security_query);
212 }
213
197 bool MockGSSAPILibrary::Init() { 214 bool MockGSSAPILibrary::Init() {
198 return true; 215 return true;
199 } 216 }
200 217
201 // These methods match the ones in the GSSAPI library. 218 // These methods match the ones in the GSSAPI library.
202 OM_uint32 MockGSSAPILibrary::import_name( 219 OM_uint32 MockGSSAPILibrary::import_name(
203 OM_uint32* minor_status, 220 OM_uint32* minor_status,
204 const gss_buffer_t input_name_buffer, 221 const gss_buffer_t input_name_buffer,
205 const gss_OID input_name_type, 222 const gss_OID input_name_type,
206 gss_name_t* output_name) { 223 gss_name_t* output_name) {
(...skipping 203 matching lines...) Expand 10 before | Expand all | Expand 10 after
410 CopyOid(*mech_type, &context.mech_type); 427 CopyOid(*mech_type, &context.mech_type);
411 if (ctx_flags) 428 if (ctx_flags)
412 *ctx_flags = context.ctx_flags; 429 *ctx_flags = context.ctx_flags;
413 if (locally_initiated) 430 if (locally_initiated)
414 *locally_initiated = context.locally_initiated; 431 *locally_initiated = context.locally_initiated;
415 if (open) 432 if (open)
416 *open = context.open; 433 *open = context.open;
417 return GSS_S_COMPLETE; 434 return GSS_S_COMPLETE;
418 } 435 }
419 436
420 void MockGSSAPILibrary::ExpectSecurityContext(
421 const std::string& expected_package,
422 OM_uint32 response_code,
423 OM_uint32 minor_response_code,
424 const GssContextMockImpl& context_info,
425 const gss_buffer_desc& expected_input_token,
426 const gss_buffer_desc& output_token) {
427 SecurityContextQuery security_query;
428 security_query.expected_package = expected_package;
429 security_query.response_code = response_code;
430 security_query.minor_response_code = minor_response_code;
431 security_query.context_info.Assign(context_info);
432 security_query.expected_input_token = expected_input_token;
433 security_query.output_token = output_token;
434 expected_security_queries_.push_back(security_query);
435 }
436
437 } // namespace test 437 } // namespace test
438 438
439 } // namespace net 439 } // namespace net
440 440
OLDNEW
« no previous file with comments | « net/http/mock_gssapi_library_posix.h ('k') | net/proxy/proxy_list.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698