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/base/test_data_directory.h" | 5 #include "net/base/test_data_directory.h" |
6 | 6 |
7 #include "base/base_paths.h" | 7 #include "base/base_paths.h" |
8 #include "base/path_service.h" | 8 #include "base/path_service.h" |
9 | 9 |
10 namespace net { | 10 namespace net { |
11 | 11 |
| 12 namespace { |
| 13 const FilePath::CharType kCertificateRelativePath[] = |
| 14 FILE_PATH_LITERAL("net/data/ssl/certificates"); |
| 15 } // namespace |
| 16 |
12 FilePath GetTestCertsDirectory() { | 17 FilePath GetTestCertsDirectory() { |
13 FilePath certs_dir; | 18 FilePath src_root; |
14 PathService::Get(base::DIR_SOURCE_ROOT, &certs_dir); | 19 PathService::Get(base::DIR_SOURCE_ROOT, &src_root); |
15 return certs_dir.Append(FILE_PATH_LITERAL("net/data/ssl/certificates")); | 20 return src_root.Append(kCertificateRelativePath); |
| 21 } |
| 22 |
| 23 FilePath GetTestCertsDirectoryRelative() { |
| 24 return FilePath(kCertificateRelativePath); |
16 } | 25 } |
17 | 26 |
18 FilePath GetWebSocketTestDataDirectory() { | 27 FilePath GetWebSocketTestDataDirectory() { |
19 FilePath data_dir(FILE_PATH_LITERAL("net/data/websocket")); | 28 FilePath data_dir(FILE_PATH_LITERAL("net/data/websocket")); |
20 return data_dir; | 29 return data_dir; |
21 } | 30 } |
22 | 31 |
23 } // namespace net | 32 } // namespace net |
OLD | NEW |