From 28cfaed056451113a72ce00603848f4a6dd616bb Mon Sep 17 00:00:00 2001 From: "brettw@chromium.org" Date: Mon, 22 Aug 2011 22:15:58 +0000 Subject: Don't use a scoped_refptr for StringVar::FromPPVar This was leftover from a previous design where I thought it would be necessary. It turns out it just made the code ugly and did unnecessary refcounting. Review URL: http://codereview.chromium.org/7621054 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@97751 0039d316-1c4b-4281-b951-d872f2087c98 --- ppapi/shared_impl/var.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'ppapi/shared_impl/var.h') diff --git a/ppapi/shared_impl/var.h b/ppapi/shared_impl/var.h index 1ff42dd..02553bb 100644 --- a/ppapi/shared_impl/var.h +++ b/ppapi/shared_impl/var.h @@ -84,7 +84,7 @@ class Var : public base::RefCounted { // return StringVar::StringToPPVar(module, my_string); // // Converting a PP_Var to a string: -// scoped_refptr string(StringVar::FromPPVar(var)); +// StringVar* string = StringVar::FromPPVar(var); // if (!string) // return false; // Not a string or an invalid var. // DoSomethingWithTheString(string->value()); @@ -112,7 +112,7 @@ class StringVar : public Var { // Helper function that converts a PP_Var to a string. This will return NULL // if the PP_Var is not of string type or the string is invalid. - static scoped_refptr FromPPVar(PP_Var var); + static StringVar* FromPPVar(PP_Var var); private: std::string value_; -- cgit v1.1