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

Unified Diff: ppapi/proxy/host_var_serialization_rules.h

Issue 9138027: PPAPI: Reduce string copying in SerializedVar. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Duh Created 8 years, 11 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 | « no previous file | ppapi/proxy/host_var_serialization_rules.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ppapi/proxy/host_var_serialization_rules.h
diff --git a/ppapi/proxy/host_var_serialization_rules.h b/ppapi/proxy/host_var_serialization_rules.h
index bbbb3d778e5852e4408572ffeb72f7d6b24677c1..609980fcd6491f54d676aa2643f378790c1a2e84 100644
--- a/ppapi/proxy/host_var_serialization_rules.h
+++ b/ppapi/proxy/host_var_serialization_rules.h
@@ -22,22 +22,24 @@ class HostVarSerializationRules : public VarSerializationRules {
~HostVarSerializationRules();
// VarSerialization implementation.
- virtual PP_Var SendCallerOwned(const PP_Var& var, std::string* str_val);
+ virtual PP_Var SendCallerOwned(const PP_Var& var,
+ const std::string** str_ptr_out);
virtual PP_Var BeginReceiveCallerOwned(const PP_Var& var,
- const std::string* str_val,
+ scoped_ptr<std::string> str,
Dispatcher* dispatcher);
virtual void EndReceiveCallerOwned(const PP_Var& var);
virtual PP_Var ReceivePassRef(const PP_Var& var,
- const std::string& str_val,
+ scoped_ptr<std::string> str,
Dispatcher* dispatcher);
- virtual PP_Var BeginSendPassRef(const PP_Var& var, std::string* str_val);
+ virtual PP_Var BeginSendPassRef(const PP_Var& var,
+ const std::string** str_ptr_out);
virtual void EndSendPassRef(const PP_Var& var, Dispatcher* dispatcher);
virtual void ReleaseObjectRef(const PP_Var& var);
private:
// Converts the given var (which must be a VARTYPE_STRING) to the given
// string object.
- void VarToString(const PP_Var& var, std::string* str);
+ void VarToStringPtr(const PP_Var& var, const std::string** str);
PP_Module pp_module_;
« no previous file with comments | « no previous file | ppapi/proxy/host_var_serialization_rules.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698