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/base_test_server.h" | 5 #include "net/test/base_test_server.h" |
6 | 6 |
7 #include <string> | 7 #include <string> |
8 #include <vector> | 8 #include <vector> |
9 | 9 |
10 #include "base/base64.h" | 10 #include "base/base64.h" |
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
85 case CERT_AUTO: | 85 case CERT_AUTO: |
86 return base::FilePath(); | 86 return base::FilePath(); |
87 default: | 87 default: |
88 NOTREACHED(); | 88 NOTREACHED(); |
89 } | 89 } |
90 return base::FilePath(); | 90 return base::FilePath(); |
91 } | 91 } |
92 | 92 |
93 std::string BaseTestServer::SSLOptions::GetOCSPArgument() const { | 93 std::string BaseTestServer::SSLOptions::GetOCSPArgument() const { |
94 if (server_certificate != CERT_AUTO) | 94 if (server_certificate != CERT_AUTO) |
95 return ""; | 95 return std::string(); |
96 | 96 |
97 switch (ocsp_status) { | 97 switch (ocsp_status) { |
98 case OCSP_OK: | 98 case OCSP_OK: |
99 return "ok"; | 99 return "ok"; |
100 case OCSP_REVOKED: | 100 case OCSP_REVOKED: |
101 return "revoked"; | 101 return "revoked"; |
102 case OCSP_INVALID: | 102 case OCSP_INVALID: |
103 return "invalid"; | 103 return "invalid"; |
104 case OCSP_UNAUTHORIZED: | 104 case OCSP_UNAUTHORIZED: |
105 return "unauthorized"; | 105 return "unauthorized"; |
106 case OCSP_UNKNOWN: | 106 case OCSP_UNKNOWN: |
107 return "unknown"; | 107 return "unknown"; |
108 default: | 108 default: |
109 NOTREACHED(); | 109 NOTREACHED(); |
110 return ""; | 110 return std::string(); |
111 } | 111 } |
112 } | 112 } |
113 | 113 |
114 const char BaseTestServer::kLocalhost[] = "127.0.0.1"; | 114 const char BaseTestServer::kLocalhost[] = "127.0.0.1"; |
115 | 115 |
116 BaseTestServer::BaseTestServer(Type type, const std::string& host) | 116 BaseTestServer::BaseTestServer(Type type, const std::string& host) |
117 : type_(type), | 117 : type_(type), |
118 started_(false), | 118 started_(false), |
119 log_to_console_(false) { | 119 log_to_console_(false) { |
120 Init(host); | 120 Init(host); |
(...skipping 269 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
390 | 390 |
391 return GenerateAdditionalArguments(arguments); | 391 return GenerateAdditionalArguments(arguments); |
392 } | 392 } |
393 | 393 |
394 bool BaseTestServer::GenerateAdditionalArguments( | 394 bool BaseTestServer::GenerateAdditionalArguments( |
395 base::DictionaryValue* arguments) const { | 395 base::DictionaryValue* arguments) const { |
396 return true; | 396 return true; |
397 } | 397 } |
398 | 398 |
399 } // namespace net | 399 } // namespace net |
OLD | NEW |