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/browser/shell_integration_unittest.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/browser/shell_integration_unittest.cc')
-rw-r--r-- | chrome/browser/shell_integration_unittest.cc | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/chrome/browser/shell_integration_unittest.cc b/chrome/browser/shell_integration_unittest.cc index bbda7fc..4776d8d 100644 --- a/chrome/browser/shell_integration_unittest.cc +++ b/chrome/browser/shell_integration_unittest.cc @@ -1,4 +1,4 @@ -// Copyright (c) 2009 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. @@ -19,7 +19,7 @@ #include "testing/gtest/include/gtest/gtest.h" #if defined(OS_LINUX) -#include "base/linux_util.h" +#include "base/env_var.h" #endif // defined(OS_LINUX) #define FPL FILE_PATH_LITERAL @@ -28,16 +28,16 @@ namespace { // Provides mock environment variables values based on a stored map. -class MockEnvironmentVariableGetter : public base::EnvironmentVariableGetter { +class MockEnvVarGetter : public base::EnvVarGetter { public: - MockEnvironmentVariableGetter() { + MockEnvVarGetter() { } void Set(const std::string& name, const std::string& value) { variables_[name] = value; } - virtual bool Getenv(const char* variable_name, std::string* result) { + virtual bool GetEnv(const char* variable_name, std::string* result) { if (ContainsKey(variables_, variable_name)) { *result = variables_[variable_name]; return true; @@ -49,7 +49,7 @@ class MockEnvironmentVariableGetter : public base::EnvironmentVariableGetter { private: std::map<std::string, std::string> variables_; - DISALLOW_COPY_AND_ASSIGN(MockEnvironmentVariableGetter); + DISALLOW_COPY_AND_ASSIGN(MockEnvVarGetter); }; } // namespace @@ -71,7 +71,7 @@ TEST(ShellIntegrationTest, GetDesktopShortcutTemplate) { ScopedTempDir temp_dir; ASSERT_TRUE(temp_dir.CreateUniqueTempDir()); - MockEnvironmentVariableGetter env_getter; + MockEnvVarGetter env_getter; env_getter.Set("XDG_DATA_HOME", temp_dir.path().value()); ASSERT_TRUE(file_util::WriteFile( temp_dir.path().AppendASCII(kTemplateFilename), @@ -86,7 +86,7 @@ TEST(ShellIntegrationTest, GetDesktopShortcutTemplate) { ScopedTempDir temp_dir; ASSERT_TRUE(temp_dir.CreateUniqueTempDir()); - MockEnvironmentVariableGetter env_getter; + MockEnvVarGetter env_getter; env_getter.Set("XDG_DATA_DIRS", temp_dir.path().value()); ASSERT_TRUE(file_util::CreateDirectory( temp_dir.path().AppendASCII("applications"))); @@ -104,7 +104,7 @@ TEST(ShellIntegrationTest, GetDesktopShortcutTemplate) { ScopedTempDir temp_dir; ASSERT_TRUE(temp_dir.CreateUniqueTempDir()); - MockEnvironmentVariableGetter env_getter; + MockEnvVarGetter env_getter; env_getter.Set("XDG_DATA_DIRS", temp_dir.path().value() + ":" + temp_dir.path().AppendASCII("applications").value()); ASSERT_TRUE(file_util::CreateDirectory( |