chromium/chrome/common/chrome_paths_linux.cc

// Copyright 2012 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#include "chrome/common/chrome_paths.h"

#include <memory>

#include "base/base_paths.h"
#include "base/environment.h"
#include "base/files/file_util.h"
#include "base/nix/xdg_util.h"
#include "base/path_service.h"
#include "base/strings/string_util.h"
#include "build/branding_buildflags.h"
#include "build/build_config.h"
#include "build/chromeos_buildflags.h"
#include "chrome/common/channel_info.h"
#include "chrome/common/chrome_paths_internal.h"

namespace chrome {

GetXDGDirectory;
GetXDGUserDirectory;
kDotConfigDir;
kXdgConfigHomeEnvVar;

namespace {

const char kDownloadsDir[] =;
const char kMusicDir[] =;
const char kPicturesDir[] =;
const char kVideosDir[] =;

// Generic function for GetUser{Music,Pictures,Video}Directory.
bool GetUserMediaDirectory(const std::string& xdg_name,
                           const std::string& fallback_name,
                           base::FilePath* result) {}

}  // namespace

// This returns <config-home>/<product>, where
//   <config-home> is:
//     $CHROME_CONFIG_HOME if set
//     otherwise $XDG_CONFIG_HOME if set
//     otherwise ~/.config
//   and <product> is:
//     "chromium" for Chromium
//     "google-chrome" for stable channel official build
//     "google-chrome-beta" for beta channel official build
//     "google-chrome-unstable" for dev channel official build
//
// (Note that ChromeMainDelegate will override the value returned by this
// function if $CHROME_USER_DATA_DIR or --user-data-dir is set.)
//
// See http://standards.freedesktop.org/basedir-spec/basedir-spec-latest.html
// for a spec on where config files go.  Using ~/.config also helps us sidestep
// issues with other apps grabbing ~/.chromium .
bool GetDefaultUserDataDirectory(base::FilePath* result) {}

void GetUserCacheDirectory(const base::FilePath& profile_dir,
                           base::FilePath* result) {}

bool GetUserDocumentsDirectory(base::FilePath* result) {}

bool GetUserDownloadsDirectorySafe(base::FilePath* result) {}

bool GetUserDownloadsDirectory(base::FilePath* result) {}

// We respect the user's preferred pictures location, unless it is
// ~ or their desktop directory, in which case we default to ~/Music.
bool GetUserMusicDirectory(base::FilePath* result) {}

// We respect the user's preferred pictures location, unless it is
// ~ or their desktop directory, in which case we default to ~/Pictures.
bool GetUserPicturesDirectory(base::FilePath* result) {}

// We respect the user's preferred pictures location, unless it is
// ~ or their desktop directory, in which case we default to ~/Videos.
bool GetUserVideosDirectory(base::FilePath* result) {}

bool ProcessNeedsProfileDir(const std::string& process_type) {}

}  // namespace chrome