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

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

Issue 2776613002: media: Move Widevine signature of Framework into a bundle (Closed)
Patch Set: media: Move Framework signature into a bundle Created 3 years, 9 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
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 63 matching lines...) Expand 10 before | Expand all | Expand 10 after
74 for (size_t i = 0; i < arraysize(kVersionedFiles); ++i) { 74 for (size_t i = 0; i < arraysize(kVersionedFiles); ++i) {
75 base::FilePath file_path = version_dir.Append(kVersionedFiles[i]); 75 base::FilePath file_path = version_dir.Append(kVersionedFiles[i]);
76 DVLOG(2) << __func__ << ": versioned file " << i << " at " 76 DVLOG(2) << __func__ << ": versioned file " << i << " at "
77 << file_path.value(); 77 << file_path.value();
78 cdm_host_file_paths->push_back( 78 cdm_host_file_paths->push_back(
79 CdmHostFilePath(file_path, GetSigFilePath(file_path))); 79 CdmHostFilePath(file_path, GetSigFilePath(file_path)));
80 } 80 }
81 81
82 #elif defined(OS_MACOSX) 82 #elif defined(OS_MACOSX)
83 83
84 // Framework signature is next to the framework directory, not next to
85 // the actual framework executable.
86 base::FilePath chrome_framework_path = 84 base::FilePath chrome_framework_path =
87 base::mac::FrameworkBundlePath().Append(chrome::kFrameworkExecutableName); 85 base::mac::FrameworkBundlePath().Append(chrome::kFrameworkExecutableName);
88 base::FilePath chrome_framework_sig_path = 86
89 GetSigFilePath(base::mac::FrameworkBundlePath().DirName().Append( 87 // Framework signature is in the "Widevine Resources.bundle" next to the
90 chrome::kFrameworkExecutableName)); 88 // framework directory, not next to the actual framework executable.
89 static const base::FilePath::CharType kWidevineResourcesPath[] =
90 FILE_PATH_LITERAL("Widevine Resources.bundle/Contents/Resources");
91 base::FilePath widevine_signature_path =
92 base::mac::FrameworkBundlePath().DirName().Append(kWidevineResourcesPath);
93 base::FilePath chrome_framework_sig_path = GetSigFilePath(
94 widevine_signature_path.Append(chrome::kFrameworkExecutableName));
91 95
92 DVLOG(2) << __func__ 96 DVLOG(2) << __func__
93 << ": chrome_framework_path=" << chrome_framework_path.value() 97 << ": chrome_framework_path=" << chrome_framework_path.value()
94 << ", signature_path=" << chrome_framework_sig_path.value(); 98 << ", signature_path=" << chrome_framework_sig_path.value();
95 cdm_host_file_paths->push_back( 99 cdm_host_file_paths->push_back(
96 CdmHostFilePath(chrome_framework_path, chrome_framework_sig_path)); 100 CdmHostFilePath(chrome_framework_path, chrome_framework_sig_path));
97 101
98 #elif defined(OS_LINUX) 102 #elif defined(OS_LINUX)
99 103
100 base::FilePath chrome_exe_dir; 104 base::FilePath chrome_exe_dir;
(...skipping 13 matching lines...) Expand all
114 118
115 void AddCdmHostFilePaths( 119 void AddCdmHostFilePaths(
116 std::vector<content::CdmHostFilePath>* cdm_host_file_paths) { 120 std::vector<content::CdmHostFilePath>* cdm_host_file_paths) {
117 NOTIMPLEMENTED() << "CDM host file paths need to be provided for the CDM to " 121 NOTIMPLEMENTED() << "CDM host file paths need to be provided for the CDM to "
118 "verify the host."; 122 "verify the host.";
119 } 123 }
120 124
121 #endif // defined(GOOGLE_CHROME_BUILD) 125 #endif // defined(GOOGLE_CHROME_BUILD)
122 126
123 } // namespace chrome 127 } // namespace chrome
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698