OLD | NEW |
---|---|
(Empty) | |
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 | |
3 // found in the LICENSE file. | |
4 | |
5 #ifndef CHROME_BROWSER_SAFE_BROWSING_LOCAL_SAFEBROWSING_TEST_SERVER_H_ | |
6 #define CHROME_BROWSER_SAFE_BROWSING_LOCAL_SAFEBROWSING_TEST_SERVER_H_ | |
7 | |
8 #include "base/basictypes.h" | |
9 #include "base/compiler_specific.h" | |
10 #include "net/test/local_test_server.h" | |
11 | |
12 // Runs a Python-based safebrowsing test server on the same machine in which the | |
13 // LocalSafeBrowsingTestServer runs. | |
14 class LocalSafeBrowsingTestServer : public net::LocalTestServer { | |
15 public: | |
16 // Initialize a safebrowsing server using the given |data_file|. | |
17 explicit LocalSafeBrowsingTestServer(const FilePath& data_file); | |
18 | |
19 virtual ~LocalSafeBrowsingTestServer(); | |
20 | |
21 virtual bool SetPythonPath() const OVERRIDE; | |
22 | |
23 // Returns the path to safe_browsing_testserver.py. | |
24 virtual bool GetTestServerPath(FilePath* testserver_path) const OVERRIDE; | |
25 | |
26 protected: | |
27 // Adds the --data-file switch. Returns true on success. | |
28 virtual bool GenerateAdditionalArguments( | |
29 base::DictionaryValue* arguments) const OVERRIDE; | |
30 | |
31 private: | |
32 FilePath data_file_; | |
Ryan Sleevi
2012/09/01 02:18:02
nit: include base/file_path.h directly, since you'
| |
33 | |
34 DISALLOW_COPY_AND_ASSIGN(LocalSafeBrowsingTestServer); | |
35 }; | |
36 | |
37 #endif // CHROME_BROWSER_SAFE_BROWSING_LOCAL_SAFEBROWSING_TEST_SERVER_H_ | |
OLD | NEW |