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

Unified Diff: base/env_var.h

Issue 3076020: Reland r54418 - base: Add UnSetEnv function to EnvVarGetter API. (Closed) Base URL: git://git.chromium.org/chromium.git
Patch Set: Created 10 years, 5 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
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;
};
} // namespace base
« no previous file with comments | « app/l10n_util_unittest.cc ('k') | base/env_var.cc » ('j') | chrome/plugin/plugin_main_mac.mm » ('J')

Powered by Google App Engine
This is Rietveld 408576698