Files
brave-core/common/brave_paths.cc
T
Simon Hong 55f0f0815b Use widevine component on linux
Chromium started to support widevine cdm component since c79.
Before that, only bundling was supported.
So, we've been using our widevine manager for downloading/managing
widevine during the runtime.
With enabling widevine cdm component, all our codes are deleted.
2020-12-03 20:37:35 +09:00

44 lines
1.1 KiB
C++

/* Copyright (c) 2019 The Brave Authors. All rights reserved.
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this file,
* You can obtain one at http://mozilla.org/MPL/2.0/. */
#include "brave/common/brave_paths.h"
#include "base/base_paths.h"
#include "base/files/file_path.h"
#include "base/files/file_util.h"
#include "base/logging.h"
#include "base/path_service.h"
#include "build/build_config.h"
namespace brave {
bool PathProvider(int key, base::FilePath* result) {
base::FilePath cur;
switch (key) {
case DIR_TEST_DATA:
if (!base::PathService::Get(base::DIR_SOURCE_ROOT, &cur))
return false;
cur = cur.Append(FILE_PATH_LITERAL("brave"));
cur = cur.Append(FILE_PATH_LITERAL("test"));
cur = cur.Append(FILE_PATH_LITERAL("data"));
if (!base::PathExists(cur)) // We don't want to create this.
return false;
break;
default:
return false;
}
*result = cur;
return true;
}
void RegisterPathProvider() {
base::PathService::RegisterProvider(PathProvider, PATH_START, PATH_END);
}
} // namespace brave