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

Unified Diff: ppapi/proxy/var_serialization_rules.h

Issue 9316123: Remove special handling for strings in var serialization. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 10 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: ppapi/proxy/var_serialization_rules.h
diff --git a/ppapi/proxy/var_serialization_rules.h b/ppapi/proxy/var_serialization_rules.h
index 92d0db899b9872b1368d244d19e971c800185682..bfedb061b941548d8861ef5ebc679010964dc98c 100644
--- a/ppapi/proxy/var_serialization_rules.h
+++ b/ppapi/proxy/var_serialization_rules.h
@@ -28,24 +28,17 @@ class VarSerializationRules {
// argument. The caller has a reference to the var, and the caller is
// responsible for freeing that reference.
- // Prepares the given var for sending to the remote process. If the var is a
- // string, *str_ptr_out will be set to point to the string in the tracker
- // referenced by var. If the var is not a string, *str_ptr_out will be
- // untouched and may be NULL. For object vars, the returned var will contain
- // the id valid for the host process. Otherwise, the returned var is valid in
- // the local process.
- virtual PP_Var SendCallerOwned(const PP_Var& var,
- const std::string** str_ptr_out) = 0;
+ // Prepares the given var for sending to the remote process. For object vars,
+ // the returned var will contain the id valid for the host process.
+ // Otherwise, the returned var is valid in the local process.
+ virtual PP_Var SendCallerOwned(const PP_Var& var) = 0;
// When receiving a caller-owned variable, normally we don't have to do
// anything. However, in the case of strings, we need to deserialize the
- // string from IPC, create a new PP_Var string in the local process, call the
- // function, and then destroy the temporary string. These two functions
- // handle that process.
+ // string from IPC, call the function, and then destroy the temporary string.
+ // These two functions handle that process.
//
- // BeginReceiveCallerOwned takes a var from IPC and an optional pointer to
- // the deserialized string (which will be used only when var is a
- // VARTYPE_STRING and may be NULL otherwise) and returns a new var
+ // BeginReceiveCallerOwned takes a var from IPC and returns a new var
// representing the input in the local process.
//
// EndReceiveCallerOwned releases the reference count in the Var tracker for
@@ -53,7 +46,6 @@ class VarSerializationRules {
// took a reference to the Var, it will remain in the tracker after
// EndReceiveCallerOwned).
virtual PP_Var BeginReceiveCallerOwned(const PP_Var& var,
- scoped_ptr<std::string> str,
Dispatcher* dispatcher) = 0;
virtual void EndReceiveCallerOwned(const PP_Var& var) = 0;
@@ -68,24 +60,21 @@ class VarSerializationRules {
// return value).
// Creates a var in the context of the local process from the given
- // deserialized var and deserialized string (which will be used only when var
- // is a VARTYPE_STRING and may be NULL otherwise). The input var/string
- // should be the result of calling SendPassRef in the remote process. The
- // return value is the var valid in the host process for object vars.
- // Otherwise, the return value is a var which is valid in the local process.
+ // deserialized var. The input var should be the result of calling
+ // SendPassRef in the remote process. The return value is the var valid in
+ // the host process for object vars. Otherwise, the return value is a var
+ // which is valid in the local process.
virtual PP_Var ReceivePassRef(const PP_Var& var,
- scoped_ptr<std::string> str,
Dispatcher* dispatcher) = 0;
// Prepares a var to be sent to the remote side. One local reference will
// be passed to the remote side. Call Begin* before doing the send and End*
- // after doing the send. See SendCallerOwned for a description of the string.
+ // after doing the send
//
// For object vars, the return value from BeginSendPassRef will be the var
// valid for the host process. Otherwise, it is a var that is valid in the
// local process. This same var must be passed to EndSendPassRef.
- virtual PP_Var BeginSendPassRef(const PP_Var& var,
- const std::string** str_ptr_out) = 0;
+ virtual PP_Var BeginSendPassRef(const PP_Var& var) = 0;
virtual void EndSendPassRef(const PP_Var& var, Dispatcher* dispatcher) = 0;
// ---------------------------------------------------------------------------

Powered by Google App Engine
This is Rietveld 408576698