Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 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 | 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/media/wv_test_license_server_config.h" | 5 #include "chrome/browser/media/wv_test_license_server_config.h" |
| 6 | 6 |
| 7 #include "base/command_line.h" | 7 #include "base/command_line.h" |
| 8 #include "base/environment.h" | 8 #include "base/environment.h" |
| 9 #include "base/files/file_util.h" | 9 #include "base/files/file_util.h" |
| 10 #include "base/path_service.h" | 10 #include "base/path_service.h" |
| (...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 114 port_ = try_port; | 114 port_ = try_port; |
| 115 return true; | 115 return true; |
| 116 } | 116 } |
| 117 } | 117 } |
| 118 DVLOG(0) << "Could not find an open port in the range of " << kMinPort << | 118 DVLOG(0) << "Could not find an open port in the range of " << kMinPort << |
| 119 " to " << kMinPort + kPortRangeSize; | 119 " to " << kMinPort + kPortRangeSize; |
| 120 return false; | 120 return false; |
| 121 } | 121 } |
| 122 | 122 |
| 123 bool WVTestLicenseServerConfig::IsPlatformSupported() { | 123 bool WVTestLicenseServerConfig::IsPlatformSupported() { |
| 124 #if defined(OS_LINUX) && defined(ARCH_CPU_X86_64) | 124 #if defined(OS_LINUX) && defined(ARCH_CPU_X86_64) && defined(OFFICIAL_BUILD) |
|
ddorwin
2015/03/28 04:00:11
This should not be committed. You can add a TODO t
jrummell
2015/04/01 23:37:36
Removed.
| |
| 125 return true; | 125 return true; |
| 126 #else | 126 #else |
| 127 return false; | 127 return false; |
| 128 #endif // defined(OS_LINUX) | 128 #endif // defined(OS_LINUX) |
| 129 } | 129 } |
| 130 | 130 |
| 131 std::string WVTestLicenseServerConfig::GetServerURL() { | 131 std::string WVTestLicenseServerConfig::GetServerURL() { |
| 132 return base::StringPrintf("http://localhost:%u/license_server", port_); | 132 return base::StringPrintf("http://localhost:%u/license_server", port_); |
| 133 } | 133 } |
| 134 | 134 |
| (...skipping 12 matching lines...) Expand all Loading... | |
| 147 | 147 |
| 148 void WVTestLicenseServerConfig::GetLicenseServerRootPath( | 148 void WVTestLicenseServerConfig::GetLicenseServerRootPath( |
| 149 base::FilePath* path) { | 149 base::FilePath* path) { |
| 150 base::FilePath source_root; | 150 base::FilePath source_root; |
| 151 PathService::Get(base::DIR_SOURCE_ROOT, &source_root); | 151 PathService::Get(base::DIR_SOURCE_ROOT, &source_root); |
| 152 *path = source_root.Append(FILE_PATH_LITERAL("third_party")) | 152 *path = source_root.Append(FILE_PATH_LITERAL("third_party")) |
| 153 .Append(FILE_PATH_LITERAL("widevine")) | 153 .Append(FILE_PATH_LITERAL("widevine")) |
| 154 .Append(FILE_PATH_LITERAL("test")) | 154 .Append(FILE_PATH_LITERAL("test")) |
| 155 .Append(FILE_PATH_LITERAL("license_server")); | 155 .Append(FILE_PATH_LITERAL("license_server")); |
| 156 } | 156 } |
| OLD | NEW |