diff options
author | thestig@chromium.org <thestig@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-04-03 01:05:39 +0000 |
---|---|---|
committer | thestig@chromium.org <thestig@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-04-03 01:05:39 +0000 |
commit | 9bc8cff2f20eb98d86cfa77f5e75b5b3efc80ced (patch) | |
tree | 969fefb9d6c5d42d974fccd4d640861dc880a73d /chrome/common/chrome_paths_linux.cc | |
parent | d5c8101d795d43c265d81277305958d38160ab19 (diff) | |
download | chromium_src-9bc8cff2f20eb98d86cfa77f5e75b5b3efc80ced.zip chromium_src-9bc8cff2f20eb98d86cfa77f5e75b5b3efc80ced.tar.gz chromium_src-9bc8cff2f20eb98d86cfa77f5e75b5b3efc80ced.tar.bz2 |
Move EnvironmentVariableGetter from base/linux_util.h to base/env_var.h and rename it EnvVarGetter. Label base::SysInfo::{Get,Has}EnvVar as deprecated.
BUG=none
TEST=none
Review URL: http://codereview.chromium.org/1606007
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@43559 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/common/chrome_paths_linux.cc')
-rw-r--r-- | chrome/common/chrome_paths_linux.cc | 18 |
1 files changed, 7 insertions, 11 deletions
diff --git a/chrome/common/chrome_paths_linux.cc b/chrome/common/chrome_paths_linux.cc index 5a880e1..7568179 100644 --- a/chrome/common/chrome_paths_linux.cc +++ b/chrome/common/chrome_paths_linux.cc @@ -1,9 +1,10 @@ -// Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. +// Copyright (c) 2010 The Chromium Authors. All rights reserved. // 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_internal.h" +#include "base/env_var.h" #include "base/linux_util.h" #include "base/scoped_ptr.h" @@ -15,8 +16,7 @@ namespace chrome { // ~/.config/google-chrome/ for official builds. // (This also helps us sidestep issues with other apps grabbing ~/.chromium .) bool GetDefaultUserDataDirectory(FilePath* result) { - scoped_ptr<base::EnvironmentVariableGetter> env( - base::EnvironmentVariableGetter::Create()); + scoped_ptr<base::EnvVarGetter> env(base::EnvVarGetter::Create()); FilePath config_dir( base::GetXDGDirectory(env.get(), "XDG_CONFIG_HOME", ".config")); #if defined(GOOGLE_CHROME_BUILD) @@ -28,8 +28,7 @@ bool GetDefaultUserDataDirectory(FilePath* result) { } bool GetChromeFrameUserDataDirectory(FilePath* result) { - scoped_ptr<base::EnvironmentVariableGetter> env( - base::EnvironmentVariableGetter::Create()); + scoped_ptr<base::EnvVarGetter> env(base::EnvVarGetter::Create()); FilePath config_dir( base::GetXDGDirectory(env.get(), "XDG_CONFIG_HOME", ".config")); #if defined(GOOGLE_CHROME_BUILD) @@ -41,8 +40,7 @@ bool GetChromeFrameUserDataDirectory(FilePath* result) { } bool GetUserDocumentsDirectory(FilePath* result) { - scoped_ptr<base::EnvironmentVariableGetter> env( - base::EnvironmentVariableGetter::Create()); + scoped_ptr<base::EnvVarGetter> env(base::EnvVarGetter::Create()); *result = base::GetXDGUserDirectory(env.get(), "DOCUMENTS", "Documents"); return true; } @@ -50,8 +48,7 @@ bool GetUserDocumentsDirectory(FilePath* result) { // We respect the user's preferred download location, unless it is // ~ or their desktop directory, in which case we default to ~/Downloads. bool GetUserDownloadsDirectory(FilePath* result) { - scoped_ptr<base::EnvironmentVariableGetter> env( - base::EnvironmentVariableGetter::Create()); + scoped_ptr<base::EnvVarGetter> env(base::EnvVarGetter::Create()); *result = base::GetXDGUserDirectory(env.get(), "DOWNLOAD", "Downloads"); FilePath home = base::GetHomeDir(env.get()); @@ -70,8 +67,7 @@ bool GetUserDownloadsDirectory(FilePath* result) { } bool GetUserDesktop(FilePath* result) { - scoped_ptr<base::EnvironmentVariableGetter> env( - base::EnvironmentVariableGetter::Create()); + scoped_ptr<base::EnvVarGetter> env(base::EnvVarGetter::Create()); *result = base::GetXDGUserDirectory(env.get(), "DESKTOP", "Desktop"); return true; } |