Chromium Code Reviews

Side by Side Diff: chrome/common/media/cdm_host_file_path.cc

Issue 2647393004: Add Widevine signature files into Mac build (Closed)
Patch Set: move framework.sig file Created 3 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View unified diff |
« no previous file with comments | « chrome/BUILD.gn ('k') | third_party/widevine/cdm/BUILD.gn » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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"
(...skipping 62 matching lines...)
73 base::FilePath file_path = version_dir.Append(kVersionedFiles[i]); 73 base::FilePath file_path = version_dir.Append(kVersionedFiles[i]);
74 DVLOG(2) << __func__ << ": versioned file " << i << " at " 74 DVLOG(2) << __func__ << ": versioned file " << i << " at "
75 << file_path.value(); 75 << file_path.value();
76 cdm_host_file_paths->push_back( 76 cdm_host_file_paths->push_back(
77 CdmHostFilePath(file_path, GetSigFilePath(file_path))); 77 CdmHostFilePath(file_path, GetSigFilePath(file_path)));
78 } 78 }
79 79
80 #elif defined(OS_MACOSX) 80 #elif defined(OS_MACOSX)
81 81
82 // Framework signature is next to the framework directory, not next to 82 // Framework signature is next to the framework directory, not next to
83 // the actual framework executable. 83 // the actual framework executable. As the framework is now internally
sky 2017/02/22 17:00:07 Isn't there a better way to get the location rathe
jrummell 2017/02/22 23:14:51 It turns out that with the symlinks added it still
84 // versioned, the signature file is up three directories. Chrome also
85 // externally versions the framework, so there will only ever be one
86 // internal version of the framework per outer version directory.
84 base::FilePath chrome_framework_path = 87 base::FilePath chrome_framework_path =
85 base::mac::FrameworkBundlePath().Append(chrome::kFrameworkExecutableName); 88 base::mac::FrameworkBundlePath().Append(chrome::kFrameworkExecutableName);
86 base::FilePath chrome_framework_sig_path = 89 base::FilePath chrome_framework_sig_path = GetSigFilePath(
87 GetSigFilePath(base::mac::FrameworkBundlePath().DirName().Append( 90 base::mac::FrameworkBundlePath().DirName().DirName().DirName().Append(
88 chrome::kFrameworkExecutableName)); 91 chrome::kFrameworkExecutableName));
89 92
90 DVLOG(2) << __func__ 93 DVLOG(2) << __func__
91 << ": chrome_framework_path=" << chrome_framework_path.value() 94 << ": chrome_framework_path=" << chrome_framework_path.value()
92 << ", signature_path=" << chrome_framework_sig_path.value(); 95 << ", signature_path=" << chrome_framework_sig_path.value();
93 cdm_host_file_paths->push_back( 96 cdm_host_file_paths->push_back(
94 CdmHostFilePath(chrome_framework_path, chrome_framework_sig_path)); 97 CdmHostFilePath(chrome_framework_path, chrome_framework_sig_path));
95 98
96 #elif defined(OS_LINUX) 99 #elif defined(OS_LINUX)
97 100
98 base::FilePath chrome_exe_dir; 101 base::FilePath chrome_exe_dir;
99 if (!PathService::Get(base::DIR_EXE, &chrome_exe_dir)) 102 if (!PathService::Get(base::DIR_EXE, &chrome_exe_dir))
100 NOTREACHED(); 103 NOTREACHED();
101 104
102 base::FilePath chrome_path = 105 base::FilePath chrome_path =
103 chrome_exe_dir.Append(FILE_PATH_LITERAL("chrome")); 106 chrome_exe_dir.Append(FILE_PATH_LITERAL("chrome"));
104 DVLOG(2) << __func__ << ": chrome_path=" << chrome_path.value(); 107 DVLOG(2) << __func__ << ": chrome_path=" << chrome_path.value();
105 cdm_host_file_paths->push_back( 108 cdm_host_file_paths->push_back(
106 CdmHostFilePath(chrome_path, GetSigFilePath(chrome_path))); 109 CdmHostFilePath(chrome_path, GetSigFilePath(chrome_path)));
107 110
108 #endif // defined(OS_WIN) 111 #endif // defined(OS_WIN)
109 } 112 }
110 113
111 } // namespace chrome 114 } // namespace chrome
OLDNEW
« no previous file with comments | « chrome/BUILD.gn ('k') | third_party/widevine/cdm/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine