summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--remoting/client/plugin/chromoting_scriptable_object.cc2
-rw-r--r--remoting/client/plugin/chromoting_scriptable_object.h4
2 files changed, 3 insertions, 3 deletions
diff --git a/remoting/client/plugin/chromoting_scriptable_object.cc b/remoting/client/plugin/chromoting_scriptable_object.cc
index a6dbf0e..7e2de5e 100644
--- a/remoting/client/plugin/chromoting_scriptable_object.cc
+++ b/remoting/client/plugin/chromoting_scriptable_object.cc
@@ -301,7 +301,7 @@ void ChromotingScriptableObject::SendIq(const std::string& message_xml) {
}
void ChromotingScriptableObject::AddAttribute(const std::string& name,
- Var attribute) {
+ const Var& attribute) {
property_names_[name] = properties_.size();
properties_.push_back(PropertyDescriptor(name, attribute));
}
diff --git a/remoting/client/plugin/chromoting_scriptable_object.h b/remoting/client/plugin/chromoting_scriptable_object.h
index f040ee5..acb8d63 100644
--- a/remoting/client/plugin/chromoting_scriptable_object.h
+++ b/remoting/client/plugin/chromoting_scriptable_object.h
@@ -153,7 +153,7 @@ class ChromotingScriptableObject
typedef pp::Var (ChromotingScriptableObject::*MethodHandler)(
const std::vector<pp::Var>& args, pp::Var* exception);
struct PropertyDescriptor {
- PropertyDescriptor(const std::string& n, pp::Var a)
+ PropertyDescriptor(const std::string& n, const pp::Var& a)
: type(NONE), name(n), attribute(a), method(NULL) {
}
@@ -173,7 +173,7 @@ class ChromotingScriptableObject
};
// Routines to add new attribute, method properties.
- void AddAttribute(const std::string& name, pp::Var attribute);
+ void AddAttribute(const std::string& name, const pp::Var& attribute);
void AddMethod(const std::string& name, MethodHandler handler);
void SignalConnectionInfoChange(int state, int error);