move overrides into the appropriate namespace

This commit is contained in:
Shelley Vohr 2017-09-28 23:03:01 -04:00
parent 0dfadf7c09
commit c620d0de05
No known key found for this signature in database
GPG key ID: F13993A75599653C

View file

@ -94,27 +94,6 @@ void OverrideLinuxAppDataPath() {
PathService::Override(DIR_APP_DATA, path);
}
void OverrideWinAppLogsPath() {
std::string appName = GetApplicationName();
std::string logPath = "%HOMEDRIVE%%HOMEPATH%\\AppData\\Roaming\\";
std::string appLogPath = logPath + appName + "\\logs";
int status = mkdir(appLogPath.c_str(), S_IRWXU | S_IRGRP | S_IROTH);
PathService::Override(DIR_APP_LOGS, base::FilePath(appLogPath));
}
void OverrideLinuxAppLogsPath() {
std::string appName = GetApplicationName();
std::string homePath = std::string(getenv("HOME"));
std::string appLogPath = homePath + "/.config/" + appName + "/logs";
int status = mkdir(appLogPath.c_str(), S_IRWXU | S_IRGRP | S_IROTH);
PathService::Override(DIR_APP_LOGS, base::FilePath(appLogPath));
return;
}
int BrowserX11ErrorHandler(Display* d, XErrorEvent* error) {
if (!g_in_x11_io_error_handler) {
base::ThreadTaskRunnerHandle::Get()->PostTask(
@ -184,6 +163,28 @@ BrowserMainParts::BrowserMainParts() {
BrowserMainParts::~BrowserMainParts() {
}
void OverrideWinAppLogsPath() {
int status;
std::string appName = GetApplicationName();
std::string logPath = "%HOMEDRIVE%%HOMEPATH%\\AppData\\Roaming\\";
std::string appLogPath = logPath + appName + "\\logs";
status = mkdir(appLogPath.c_str(), S_IRWXU | S_IRGRP | S_IROTH);
PathService::Override(DIR_APP_LOGS, base::FilePath(appLogPath));
}
void OverrideLinuxAppLogsPath() {
int status;
std::string appName = GetApplicationName();
std::string homePath = std::string(getenv("HOME"));
std::string appLogPath = homePath + "/.config/" + appName + "/logs";
status = mkdir(appLogPath.c_str(), S_IRWXU | S_IRGRP | S_IROTH);
PathService::Override(DIR_APP_LOGS, base::FilePath(appLogPath));
}
void BrowserMainParts::PreEarlyInitialization() {
std::unique_ptr<base::FeatureList> feature_list(new base::FeatureList);
feature_list->InitializeFromCommandLine("", "");