Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(100)

Side by Side Diff: chrome/browser/policy/test/local_policy_test_server.h

Issue 12235003: Split out policy code from net/tools/testserver. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: 80 chars. Created 7 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
(Empty)
1 // Copyright (c) 2013 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_POLICY_TEST_LOCAL_POLICY_TEST_SERVER_H_
6 #define CHROME_BROWSER_POLICY_TEST_LOCAL_POLICY_TEST_SERVER_H_
7
8 #include <string>
9
10 #include "base/basictypes.h"
11 #include "base/compiler_specific.h"
12 #include "base/file_path.h"
13 #include "googleurl/src/gurl.h"
14 #include "net/test/local_test_server.h"
15
16 namespace policy {
17
18 // Runs a python implementation of the cloud policy server on the local machine.
19 class LocalPolicyTestServer : public net::LocalTestServer {
20 public:
21 // Initializes a test server configured by the configuration file
22 // |config_file|.
23 explicit LocalPolicyTestServer(const base::FilePath& config_file);
24
25 // Initializes the test server with the configuration read from
26 // chrome/test/data/policy/policy_|test_name|.json.
27 explicit LocalPolicyTestServer(const std::string& test_name);
28
29 virtual ~LocalPolicyTestServer();
30
31 // Gets the service URL.
32 GURL GetServiceURL() const;
33
34 // net::LocalTestServer:
35 virtual bool SetPythonPath() const OVERRIDE;
36 virtual bool GetTestServerPath(
37 base::FilePath* testserver_path) const OVERRIDE;
38 virtual bool GenerateAdditionalArguments(
39 base::DictionaryValue* arguments) const OVERRIDE;
40
41 private:
42 base::FilePath config_file_;
43
44 DISALLOW_COPY_AND_ASSIGN(LocalPolicyTestServer);
45 };
46
47 } // namespace
48
49 #endif // CHROME_BROWSER_POLICY_TEST_LOCAL_POLICY_TEST_SERVER_H_
OLDNEW
« no previous file with comments | « chrome/browser/policy/test/asn1der.py ('k') | chrome/browser/policy/test/local_policy_test_server.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698