| OLD | NEW |
| 1 // Copyright 2017 The Chromium Authors. All rights reserved. | 1 // Copyright 2017 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/common/media/cdm_host_file_path.h" | 5 #include "chrome/common/media/cdm_host_file_path.h" |
| 6 | 6 |
| 7 #include "base/files/file_path.h" | 7 #include "base/files/file_path.h" |
| 8 #include "base/files/file_util.h" | 8 #include "base/files/file_util.h" |
| 9 #include "base/logging.h" | 9 #include "base/logging.h" |
| 10 #include "base/macros.h" | 10 #include "base/macros.h" |
| 11 #include "base/memory/ptr_util.h" | 11 #include "base/memory/ptr_util.h" |
| 12 #include "base/path_service.h" | 12 #include "base/path_service.h" |
| 13 #include "build/build_config.h" | 13 #include "build/build_config.h" |
| 14 #include "chrome/common/chrome_version.h" | 14 #include "chrome/common/chrome_version.h" |
| 15 | 15 |
| 16 #if defined(OS_MACOSX) | 16 #if defined(OS_MACOSX) |
| 17 #include "base/mac/bundle_locations.h" | 17 #include "base/mac/bundle_locations.h" |
| 18 #include "chrome/common/chrome_constants.h" | 18 #include "chrome/common/chrome_constants.h" |
| 19 #endif | 19 #endif |
| 20 | 20 |
| 21 namespace chrome { | 21 namespace chrome { |
| 22 | 22 |
| 23 #if defined(GOOGLE_CHROME_BUILD) |
| 24 |
| 23 namespace { | 25 namespace { |
| 24 | 26 |
| 25 using content::CdmHostFilePath; | 27 using content::CdmHostFilePath; |
| 26 | 28 |
| 27 // TODO(xhwang): Move this to a common place if needed. | 29 // TODO(xhwang): Move this to a common place if needed. |
| 28 const base::FilePath::CharType kSignatureFileExtension[] = | 30 const base::FilePath::CharType kSignatureFileExtension[] = |
| 29 FILE_PATH_LITERAL(".sig"); | 31 FILE_PATH_LITERAL(".sig"); |
| 30 | 32 |
| 31 // Returns the signature file path given the |file_path|. This function should | 33 // Returns the signature file path given the |file_path|. This function should |
| 32 // only be used when the signature file and the file are located in the same | 34 // only be used when the signature file and the file are located in the same |
| (...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 101 | 103 |
| 102 base::FilePath chrome_path = | 104 base::FilePath chrome_path = |
| 103 chrome_exe_dir.Append(FILE_PATH_LITERAL("chrome")); | 105 chrome_exe_dir.Append(FILE_PATH_LITERAL("chrome")); |
| 104 DVLOG(2) << __func__ << ": chrome_path=" << chrome_path.value(); | 106 DVLOG(2) << __func__ << ": chrome_path=" << chrome_path.value(); |
| 105 cdm_host_file_paths->push_back( | 107 cdm_host_file_paths->push_back( |
| 106 CdmHostFilePath(chrome_path, GetSigFilePath(chrome_path))); | 108 CdmHostFilePath(chrome_path, GetSigFilePath(chrome_path))); |
| 107 | 109 |
| 108 #endif // defined(OS_WIN) | 110 #endif // defined(OS_WIN) |
| 109 } | 111 } |
| 110 | 112 |
| 113 #else // defined(GOOGLE_CHROME_BUILD) |
| 114 |
| 115 void AddCdmHostFilePaths( |
| 116 std::vector<content::CdmHostFilePath>* cdm_host_file_paths) { |
| 117 NOTIMPLEMENTED() << "CDM host file paths need to be provided for the CDM to " |
| 118 "verify the host."; |
| 119 } |
| 120 |
| 121 #endif // defined(GOOGLE_CHROME_BUILD) |
| 122 |
| 111 } // namespace chrome | 123 } // namespace chrome |
| OLD | NEW |