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

Side by Side Diff: media/cdm/cdm_paths.cc

Issue 1989893004: media: Use platform specific folders for CDMs (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix create_installer_archive.py Created 4 years, 7 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
(Empty)
1 // Copyright 2016 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 #include "media/cdm/cdm_paths.h"
6
7 #include <string>
8
9 #include "build/build_config.h"
10
11 namespace media {
12
13 // Note: This file must be in sync with cdm_paths.{gypi|gni}
14 // TODO(xhwang): Auto generate paths from build variables so we don't need this
ddorwin 2016/05/20 04:08:56 Do you still plan to do this? Alternatively, you c
xhwang 2016/05/20 07:18:19 Done.
15 // note.
16 #if defined(OS_MACOSX) || defined(OS_WIN)
17 #define CDM_USE_PLATFORM_SPECIFIC_PATH
18 #endif
19
20 #if defined(CDM_USE_PLATFORM_SPECIFIC_PATH)
21
22 // Special path used in chrome components.
23 const char kPlatformSpecific[] = "_platform_specific";
24
25 // Name of the component platform in the manifest.
26 const char kComponentPlatform[] =
27 #if defined(OS_MACOSX)
28 "mac";
29 #elif defined(OS_WIN)
30 "win";
31 #elif defined(OS_CHROMEOS)
32 "chromeos";
33 #elif defined(OS_LINUX)
34 "linux";
35 #else
36 "unsupported_platform";
37 #endif
38
39 // Name of the component architecture in the manifest.
40 const char kComponentArch[] =
41 #if defined(ARCH_CPU_X86)
42 "x86";
43 #elif defined(ARCH_CPU_X86_64)
44 "x64";
45 #elif defined(ARCH_CPU_ARMEL)
46 "arm";
47 #else
48 "unsupported_arch";
49 #endif
50
51 // TODO(xhwang): Use this function in Widevine CDM component installer.
ddorwin 2016/05/20 04:08:56 You probably don't need this in both files.
xhwang 2016/05/20 07:18:19 Done.
52 base::FilePath GetPlatformSpecificDirectory(const std::string& cdm_base_path) {
53 base::FilePath path;
54 const std::string kPlatformArch =
55 std::string(kComponentPlatform) + "_" + kComponentArch;
56 return path.AppendASCII(cdm_base_path)
57 .AppendASCII(kPlatformSpecific)
58 .AppendASCII(kPlatformArch);
59 }
60
61 #else // defined(CDM_USE_PLATFORM_SPECIFIC_PATH)
62
63 base::FilePath GetPlatformSpecificDirectory(const std::string& cdm_base_path) {
64 return base::FilePath();
65 }
66
67 #endif // defined(CDM_USE_PLATFORM_SPECIFIC_PATH)
68
69 } // namespace media
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698