Reland r54418 - base: Add UnSetEnv function to EnvVarGetter API.

This reverts commit 7ed083f6d2b1b0a09c8bf9470386ba3e38f2feed.

It was reverted due to crbug.com/50663 started failing when I land this patch,
so I'm relanding it now again.

BUG=None
TEST=trybots

TBR=thestig@chromium.org

Review URL: http://codereview.chromium.org/3043018

Review URL: http://codereview.chromium.org/3076020

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@54451 0039d316-1c4b-4281-b951-d872f2087c98


CrOS-Libchrome-Original-Commit: fc586c7e48d90dac7963906bf34c8f6382b55846
diff --git a/base/env_var.h b/base/env_var.h
index 9622e74..43d3fd6 100644
--- a/base/env_var.h
+++ b/base/env_var.h
@@ -20,11 +20,14 @@
 
 }  // namespace env_vars
 
-// These are used to derive mocks for unittests.
 class EnvVarGetter {
  public:
   virtual ~EnvVarGetter();
 
+  // Static factory method that returns the implementation that provide the
+  // appropriate platform-specific instance.
+  static EnvVarGetter* Create();
+
   // Gets an environment variable's value and stores it in |result|.
   // Returns false if the key is unset.
   virtual bool GetEnv(const char* variable_name, std::string* result) = 0;
@@ -36,8 +39,8 @@
   virtual bool SetEnv(const char* variable_name,
                       const std::string& new_value) = 0;
 
-  // Create an instance of EnvVarGetter
-  static EnvVarGetter* Create();
+  // Returns true on success, otherwise returns false.
+  virtual bool UnSetEnv(const char* variable_name) = 0;
 };
 
 }  // namespace base