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

Unified Diff: net/test/spawned_test_server/base_test_server.cc

Issue 1058003004: Forget SSL error exceptions when good certs seen for regular requests. (Closed) Base URL: https://chromium.googlesource.com/chromium/src@master
Patch Set: Yet Another Webview Fix (should be the last, I swear) Created 5 years, 8 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « net/test/spawned_test_server/base_test_server.h ('k') | tools/metrics/histograms/histograms.xml » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/test/spawned_test_server/base_test_server.cc
diff --git a/net/test/spawned_test_server/base_test_server.cc b/net/test/spawned_test_server/base_test_server.cc
index 3eeb685da519718e3d8e8caf8ed4e8d7a2a281b2..b8ded1f40c49c618138608793b89a3aaf50f780c 100644
--- a/net/test/spawned_test_server/base_test_server.cc
+++ b/net/test/spawned_test_server/base_test_server.cc
@@ -310,6 +310,24 @@ bool BaseTestServer::GetFilePathWithReplacements(
return true;
}
+bool BaseTestServer::LoadTestRootCert() const {
+ TestRootCerts* root_certs = TestRootCerts::GetInstance();
+ if (!root_certs)
+ return false;
+
+ // Should always use absolute path to load the root certificate.
+ base::FilePath root_certificate_path = certificates_dir_;
+ if (!certificates_dir_.IsAbsolute()) {
+ base::FilePath src_dir;
+ if (!PathService::Get(base::DIR_SOURCE_ROOT, &src_dir))
+ return false;
+ root_certificate_path = src_dir.Append(certificates_dir_);
+ }
+
+ return root_certs->AddFromFile(
+ root_certificate_path.AppendASCII("root_ca_cert.pem"));
+}
+
void BaseTestServer::Init(const std::string& host) {
host_port_pair_ = HostPortPair(host, 0);
@@ -352,24 +370,6 @@ bool BaseTestServer::ParseServerData(const std::string& server_data) {
return true;
}
-bool BaseTestServer::LoadTestRootCert() const {
- TestRootCerts* root_certs = TestRootCerts::GetInstance();
- if (!root_certs)
- return false;
-
- // Should always use absolute path to load the root certificate.
- base::FilePath root_certificate_path = certificates_dir_;
- if (!certificates_dir_.IsAbsolute()) {
- base::FilePath src_dir;
- if (!PathService::Get(base::DIR_SOURCE_ROOT, &src_dir))
- return false;
- root_certificate_path = src_dir.Append(certificates_dir_);
- }
-
- return root_certs->AddFromFile(
- root_certificate_path.AppendASCII("root_ca_cert.pem"));
-}
-
bool BaseTestServer::SetupWhenServerStarted() {
DCHECK(host_port_pair_.port());
« no previous file with comments | « net/test/spawned_test_server/base_test_server.h ('k') | tools/metrics/histograms/histograms.xml » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698