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 "chrome/browser/safe_browsing/local_safebrowsing_test_server.h" | 5 #include "chrome/browser/safe_browsing/local_safebrowsing_test_server.h" |
6 | 6 |
7 #include "base/command_line.h" | 7 #include "base/command_line.h" |
8 #include "base/path_service.h" | 8 #include "base/path_service.h" |
9 #include "base/strings/string_number_conversions.h" | 9 #include "base/strings/string_number_conversions.h" |
10 #include "base/values.h" | 10 #include "base/values.h" |
11 #include "chrome/common/chrome_paths.h" | 11 #include "chrome/common/chrome_paths.h" |
12 #include "net/test/python_utils.h" | 12 #include "net/test/python_utils.h" |
13 #include "net/test/spawned_test_server/spawned_test_server.h" | 13 #include "net/test/spawned_test_server/spawned_test_server.h" |
14 | 14 |
| 15 namespace safe_browsing { |
| 16 |
15 LocalSafeBrowsingTestServer::LocalSafeBrowsingTestServer( | 17 LocalSafeBrowsingTestServer::LocalSafeBrowsingTestServer( |
16 const base::FilePath& data_file) | 18 const base::FilePath& data_file) |
17 : net::LocalTestServer(net::SpawnedTestServer::TYPE_HTTP, | 19 : net::LocalTestServer(net::SpawnedTestServer::TYPE_HTTP, |
18 net::SpawnedTestServer::kLocalhost, | 20 net::SpawnedTestServer::kLocalhost, |
19 base::FilePath()), | 21 base::FilePath()), |
20 data_file_(data_file) { | 22 data_file_(data_file) { |
21 } | 23 } |
22 | 24 |
23 LocalSafeBrowsingTestServer::~LocalSafeBrowsingTestServer() {} | 25 LocalSafeBrowsingTestServer::~LocalSafeBrowsingTestServer() {} |
24 | 26 |
(...skipping 26 matching lines...) Expand all Loading... |
51 | 53 |
52 AppendToPythonPath(pyproto_dir.AppendASCII("google")); | 54 AppendToPythonPath(pyproto_dir.AppendASCII("google")); |
53 return true; | 55 return true; |
54 } | 56 } |
55 | 57 |
56 bool LocalSafeBrowsingTestServer::GenerateAdditionalArguments( | 58 bool LocalSafeBrowsingTestServer::GenerateAdditionalArguments( |
57 base::DictionaryValue* arguments) const { | 59 base::DictionaryValue* arguments) const { |
58 arguments->SetString("data-file", data_file_.value()); | 60 arguments->SetString("data-file", data_file_.value()); |
59 return true; | 61 return true; |
60 } | 62 } |
| 63 |
| 64 } // namespace safe_browsing |
OLD | NEW |