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 165 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
176 return false; | 176 return false; |
177 SetPort(test_server_port); | 177 SetPort(test_server_port); |
178 | 178 |
179 SetResourcePath(document_root, FilePath().AppendASCII("net") | 179 SetResourcePath(document_root, FilePath().AppendASCII("net") |
180 .AppendASCII("data") | 180 .AppendASCII("data") |
181 .AppendASCII("ssl") | 181 .AppendASCII("ssl") |
182 .AppendASCII("certificates")); | 182 .AppendASCII("certificates")); |
183 return true; | 183 return true; |
184 } | 184 } |
185 | 185 |
186 // On Android, the document root in device is not the same as the document root | |
187 // in host machine where test server is launched. So append DIR_SOURCE_ROOT | |
wtc
2012/10/23 18:28:31
1. This method should be defined between Stop() an
Shouqun Liu
2012/10/24 02:32:47
Done.
| |
188 // here to get the actual path of document root on Android device. | |
189 FilePath RemoteTestServer::GetDocumentRoot() const { | |
190 FilePath src_dir; | |
191 PathService::Get(base::DIR_SOURCE_ROOT, &src_dir); | |
192 return src_dir.Append(document_root()); | |
193 } | |
194 | |
186 } // namespace net | 195 } // namespace net |
187 | 196 |
OLD | NEW |