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..ff5ff43d5f3155140b6a1206fdcda2cd5a1db5a2 100644 |
--- a/chrome/browser/shell_integration_linux_unittest.cc |
+++ b/chrome/browser/shell_integration_linux_unittest.cc |
@@ -41,11 +41,11 @@ class MockEnvironment : public base::Environment { |
public: |
MockEnvironment() {} |
- void Set(const std::string& name, const std::string& value) { |
+ void Set(base::StringPiece name, const std::string& value) { |
variables_[name] = value; |
} |
- bool GetVar(const char* variable_name, std::string* result) override { |
+ bool GetVar(base::StringPiece variable_name, std::string* result) override { |
if (ContainsKey(variables_, variable_name)) { |
*result = variables_[variable_name]; |
return true; |
@@ -54,19 +54,19 @@ class MockEnvironment : public base::Environment { |
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; |
} |
private: |
- std::map<std::string, std::string> variables_; |
+ std::map<base::StringPiece, std::string> variables_; |
dcheng
2016/06/24 17:28:35
It's not obvious that this is safe (or that it wil
Lei Zhang
2016/06/24 18:56:03
Sure. I don't have strong feelings about creating
|
DISALLOW_COPY_AND_ASSIGN(MockEnvironment); |
}; |