1 // Copyright 2014 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_MEDIA_TEST_LICENSE_SERVER_CONFIG_H_ 6 #define CHROME_BROWSER_MEDIA_TEST_LICENSE_SERVER_CONFIG_H_ 7 8 #include <string> 9 #include "base/basictypes.h" 10 11 12 namespace base { 13 class CommandLine; 14 class FilePath; 15 } 16 17 // Class used to start a test license server. 18 class TestLicenseServerConfig { 19 public: 20 TestLicenseServerConfig() {} 21 virtual ~TestLicenseServerConfig() {} 22 23 // Returns a string containing the URL and port the server is listening to. 24 // This URL is directly used by the Web app to request a license, example: 25 // http://localhost:8888/license_server 26 virtual std::string GetServerURL() = 0; 27 28 // Returns true if it successfully sets the command line to run the license 29 // server with needed args and switches. 30 virtual bool GetServerCommandLine(base::CommandLine* command_line) = 0; 31 32 // Returns true if the server is supported on current platform. 33 virtual bool IsPlatformSupported() = 0; 34 35 private: 36 DISALLOW_COPY_AND_ASSIGN(TestLicenseServerConfig); 37 }; 38 39 #endif // CHROME_BROWSER_MEDIA_TEST_LICENSE_SERVER_CONFIG_H_ 40