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

Unified Diff: chrome/browser/shell_integration_linux_unittest.cc

Issue 2094913002: Make base::Environment::Create() return unique_ptrs. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: nit, rebase Created 4 years, 6 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 | « base/nix/xdg_util_unittest.cc ('k') | net/proxy/proxy_config_service_linux.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/shell_integration_linux_unittest.cc
diff --git a/chrome/browser/shell_integration_linux_unittest.cc b/chrome/browser/shell_integration_linux_unittest.cc
index 96a18a01250006b68d21b9fff8a280e28638c61c..d6a7120a60cf04f6d0c3313ef64be998757e6d7b 100644
--- a/chrome/browser/shell_integration_linux_unittest.cc
+++ b/chrome/browser/shell_integration_linux_unittest.cc
@@ -41,26 +41,26 @@ class MockEnvironment : public base::Environment {
public:
MockEnvironment() {}
- void Set(const std::string& name, const std::string& value) {
- variables_[name] = value;
+ void Set(base::StringPiece name, const std::string& value) {
+ variables_[name.as_string()] = value;
}
- bool GetVar(const char* variable_name, std::string* result) override {
- if (ContainsKey(variables_, variable_name)) {
- *result = variables_[variable_name];
+ bool GetVar(base::StringPiece variable_name, std::string* result) override {
+ if (ContainsKey(variables_, variable_name.as_string())) {
+ *result = variables_[variable_name.as_string()];
return true;
}
return false;
}
- bool SetVar(const char* variable_name,
+ bool SetVar(base::StringPiece variable_name,
const std::string& new_value) override {
ADD_FAILURE();
return false;
}
- bool UnSetVar(const char* variable_name) override {
+ bool UnSetVar(base::StringPiece variable_name) override {
ADD_FAILURE();
return false;
}
« no previous file with comments | « base/nix/xdg_util_unittest.cc ('k') | net/proxy/proxy_config_service_linux.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698