OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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/remote_test_server.h" | 5 #include "net/test/remote_test_server.h" |
6 | 6 |
7 #include <vector> | 7 #include <vector> |
8 | 8 |
9 #include "base/base_paths.h" | 9 #include "base/base_paths.h" |
10 #include "base/file_path.h" | 10 #include "base/file_path.h" |
(...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
125 std::string server_data; | 125 std::string server_data; |
126 base::JSONWriter::Write(&server_data_dict, &server_data); | 126 base::JSONWriter::Write(&server_data_dict, &server_data); |
127 if (server_data.empty() || !ParseServerData(server_data)) { | 127 if (server_data.empty() || !ParseServerData(server_data)) { |
128 LOG(ERROR) << "Could not parse server_data: " << server_data; | 128 LOG(ERROR) << "Could not parse server_data: " << server_data; |
129 return false; | 129 return false; |
130 } | 130 } |
131 | 131 |
132 return SetupWhenServerStarted(); | 132 return SetupWhenServerStarted(); |
133 } | 133 } |
134 | 134 |
| 135 bool RemoteTestServer::StartInBackground() { |
| 136 NOTIMPLEMENTED(); |
| 137 return false; |
| 138 } |
| 139 |
| 140 bool RemoteTestServer::BlockUntilStarted() { |
| 141 NOTIMPLEMENTED(); |
| 142 return false; |
| 143 } |
| 144 |
135 bool RemoteTestServer::Stop() { | 145 bool RemoteTestServer::Stop() { |
136 if (!spawner_communicator_.get()) | 146 if (!spawner_communicator_.get()) |
137 return true; | 147 return true; |
138 CleanUpWhenStoppingServer(); | 148 CleanUpWhenStoppingServer(); |
139 bool stopped = spawner_communicator_->StopServer(); | 149 bool stopped = spawner_communicator_->StopServer(); |
140 // Explicitly reset |spawner_communicator_| to avoid reusing the stopped one. | 150 // Explicitly reset |spawner_communicator_| to avoid reusing the stopped one. |
141 spawner_communicator_.reset(NULL); | 151 spawner_communicator_.reset(NULL); |
142 return stopped; | 152 return stopped; |
143 } | 153 } |
144 | 154 |
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
187 | 197 |
188 SetResourcePath(document_root, FilePath().AppendASCII("net") | 198 SetResourcePath(document_root, FilePath().AppendASCII("net") |
189 .AppendASCII("data") | 199 .AppendASCII("data") |
190 .AppendASCII("ssl") | 200 .AppendASCII("ssl") |
191 .AppendASCII("certificates")); | 201 .AppendASCII("certificates")); |
192 return true; | 202 return true; |
193 } | 203 } |
194 | 204 |
195 } // namespace net | 205 } // namespace net |
196 | 206 |
OLD | NEW |