Index: base/env_var.h |
diff --git a/base/env_var.h b/base/env_var.h |
index 9622e74768474a5353b9cf021bfc695d01d44d17..43d3fd64d06a90926064eb8494da644af80f3e84 100644 |
--- a/base/env_var.h |
+++ b/base/env_var.h |
@@ -20,11 +20,14 @@ extern const char kHome[]; |
} // 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 @@ class EnvVarGetter { |
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; |
viettrungluu
2010/08/03 06:02:13
Even more after-the-fact drive-by nit: "unset" is
|
}; |
} // namespace base |