OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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/test/spawned_test_server/base_test_server.h" | 5 #include "net/test/spawned_test_server/base_test_server.h" |
6 | 6 |
7 #include <stdint.h> | 7 #include <stdint.h> |
8 | |
9 #include <limits> | 8 #include <limits> |
10 #include <string> | 9 #include <string> |
| 10 #include <utility> |
11 #include <vector> | 11 #include <vector> |
12 | 12 |
13 #include "base/base64.h" | 13 #include "base/base64.h" |
14 #include "base/files/file_util.h" | 14 #include "base/files/file_util.h" |
15 #include "base/json/json_reader.h" | 15 #include "base/json/json_reader.h" |
16 #include "base/logging.h" | 16 #include "base/logging.h" |
17 #include "base/path_service.h" | 17 #include "base/path_service.h" |
18 #include "base/values.h" | 18 #include "base/values.h" |
19 #include "net/base/address_list.h" | 19 #include "net/base/address_list.h" |
20 #include "net/base/host_port_pair.h" | 20 #include "net/base/host_port_pair.h" |
(...skipping 532 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
553 arguments->Set("staple-ocsp-response", base::Value::CreateNullValue()); | 553 arguments->Set("staple-ocsp-response", base::Value::CreateNullValue()); |
554 if (ssl_options_.ocsp_server_unavailable) { | 554 if (ssl_options_.ocsp_server_unavailable) { |
555 arguments->Set("ocsp-server-unavailable", | 555 arguments->Set("ocsp-server-unavailable", |
556 base::Value::CreateNullValue()); | 556 base::Value::CreateNullValue()); |
557 } | 557 } |
558 if (!ssl_options_.npn_protocols.empty()) { | 558 if (!ssl_options_.npn_protocols.empty()) { |
559 scoped_ptr<base::ListValue> npn_protocols(new base::ListValue()); | 559 scoped_ptr<base::ListValue> npn_protocols(new base::ListValue()); |
560 for (const std::string& proto : ssl_options_.npn_protocols) { | 560 for (const std::string& proto : ssl_options_.npn_protocols) { |
561 npn_protocols->Append(new base::StringValue(proto)); | 561 npn_protocols->Append(new base::StringValue(proto)); |
562 } | 562 } |
563 arguments->Set("npn-protocols", npn_protocols.Pass()); | 563 arguments->Set("npn-protocols", std::move(npn_protocols)); |
564 } | 564 } |
565 if (ssl_options_.alert_after_handshake) | 565 if (ssl_options_.alert_after_handshake) |
566 arguments->Set("alert-after-handshake", base::Value::CreateNullValue()); | 566 arguments->Set("alert-after-handshake", base::Value::CreateNullValue()); |
567 | 567 |
568 if (ssl_options_.disable_channel_id) | 568 if (ssl_options_.disable_channel_id) |
569 arguments->Set("disable-channel-id", base::Value::CreateNullValue()); | 569 arguments->Set("disable-channel-id", base::Value::CreateNullValue()); |
570 if (ssl_options_.disable_extended_master_secret) { | 570 if (ssl_options_.disable_extended_master_secret) { |
571 arguments->Set("disable-extended-master-secret", | 571 arguments->Set("disable-extended-master-secret", |
572 base::Value::CreateNullValue()); | 572 base::Value::CreateNullValue()); |
573 } | 573 } |
574 if (!ssl_options_.supported_token_binding_params.empty()) { | 574 if (!ssl_options_.supported_token_binding_params.empty()) { |
575 scoped_ptr<base::ListValue> token_binding_params(new base::ListValue()); | 575 scoped_ptr<base::ListValue> token_binding_params(new base::ListValue()); |
576 arguments->Set( | 576 arguments->Set( |
577 "token-binding-params", | 577 "token-binding-params", |
578 GetTokenBindingParams(ssl_options_.supported_token_binding_params)); | 578 GetTokenBindingParams(ssl_options_.supported_token_binding_params)); |
579 } | 579 } |
580 } | 580 } |
581 | 581 |
582 return GenerateAdditionalArguments(arguments); | 582 return GenerateAdditionalArguments(arguments); |
583 } | 583 } |
584 | 584 |
585 bool BaseTestServer::GenerateAdditionalArguments( | 585 bool BaseTestServer::GenerateAdditionalArguments( |
586 base::DictionaryValue* arguments) const { | 586 base::DictionaryValue* arguments) const { |
587 return true; | 587 return true; |
588 } | 588 } |
589 | 589 |
590 } // namespace net | 590 } // namespace net |
OLD | NEW |