Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2941)

Unified Diff: chrome/browser/shell_integration_unittest.cc

Issue 1606007: Move EnvironmentVariableGetter from base/linux_util.h to base/env_var.h. Labe... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: fix windows build for good this time? Created 10 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/shell_integration_linux.cc ('k') | chrome/browser/web_applications/web_app.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/shell_integration_unittest.cc
===================================================================
--- chrome/browser/shell_integration_unittest.cc (revision 43506)
+++ chrome/browser/shell_integration_unittest.cc (working copy)
@@ -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 @@
private:
std::map<std::string, std::string> variables_;
- DISALLOW_COPY_AND_ASSIGN(MockEnvironmentVariableGetter);
+ DISALLOW_COPY_AND_ASSIGN(MockEnvVarGetter);
};
} // namespace
@@ -71,7 +71,7 @@
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 @@
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 @@
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(
« no previous file with comments | « chrome/browser/shell_integration_linux.cc ('k') | chrome/browser/web_applications/web_app.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698