diff options
author | jam@chromium.org <jam@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-10-24 00:26:19 +0000 |
---|---|---|
committer | jam@chromium.org <jam@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-10-24 00:26:19 +0000 |
commit | 130757671de6d0dc4b54dd3ef11c1b9eb5f039cc (patch) | |
tree | 0c92593a755e31425f69d8c3c345fff10287c4ce /content/common/content_param_traits.cc | |
parent | 375abf5c85ab185e3d659cde1e585aff2f8e6b3a (diff) | |
download | chromium_src-130757671de6d0dc4b54dd3ef11c1b9eb5f039cc.zip chromium_src-130757671de6d0dc4b54dd3ef11c1b9eb5f039cc.tar.gz chromium_src-130757671de6d0dc4b54dd3ef11c1b9eb5f039cc.tar.bz2 |
Move the remaning files in content\common to the content namespace.
Review URL: https://codereview.chromium.org/11235068
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@163732 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'content/common/content_param_traits.cc')
-rw-r--r-- | content/common/content_param_traits.cc | 52 |
1 files changed, 30 insertions, 22 deletions
diff --git a/content/common/content_param_traits.cc b/content/common/content_param_traits.cc index a48ccc5..df91adb 100644 --- a/content/common/content_param_traits.cc +++ b/content/common/content_param_traits.cc @@ -11,6 +11,8 @@ #include "webkit/plugins/npapi/plugin_host.h" #include "ui/base/range/range.h" +namespace content { + NPIdentifier_Param::NPIdentifier_Param() : identifier() { } @@ -29,6 +31,11 @@ NPVariant_Param::NPVariant_Param() NPVariant_Param::~NPVariant_Param() { } +} // namespace content + +using content::NPIdentifier_Param; +using content::NPVariant_Param; + namespace IPC { void ParamTraits<net::IPEndPoint>::Write(Message* m, const param_type& p) { @@ -52,22 +59,23 @@ void ParamTraits<net::IPEndPoint>::Log(const param_type& p, std::string* l) { void ParamTraits<NPVariant_Param>::Write(Message* m, const param_type& p) { WriteParam(m, static_cast<int>(p.type)); - if (p.type == NPVARIANT_PARAM_BOOL) { + if (p.type == content::NPVARIANT_PARAM_BOOL) { WriteParam(m, p.bool_value); - } else if (p.type == NPVARIANT_PARAM_INT) { + } else if (p.type == content::NPVARIANT_PARAM_INT) { WriteParam(m, p.int_value); - } else if (p.type == NPVARIANT_PARAM_DOUBLE) { + } else if (p.type == content::NPVARIANT_PARAM_DOUBLE) { WriteParam(m, p.double_value); - } else if (p.type == NPVARIANT_PARAM_STRING) { + } else if (p.type == content::NPVARIANT_PARAM_STRING) { WriteParam(m, p.string_value); - } else if (p.type == NPVARIANT_PARAM_SENDER_OBJECT_ROUTING_ID || - p.type == NPVARIANT_PARAM_RECEIVER_OBJECT_ROUTING_ID) { + } else if (p.type == content::NPVARIANT_PARAM_SENDER_OBJECT_ROUTING_ID || + p.type == content::NPVARIANT_PARAM_RECEIVER_OBJECT_ROUTING_ID) { // This is the routing id used to connect NPObjectProxy in the other // process with NPObjectStub in this process or to identify the raw // npobject pointer to be used in the callee process. WriteParam(m, p.npobject_routing_id); } else { - DCHECK(p.type == NPVARIANT_PARAM_VOID || p.type == NPVARIANT_PARAM_NULL); + DCHECK(p.type == content::NPVARIANT_PARAM_VOID || + p.type == content::NPVARIANT_PARAM_NULL); } } @@ -79,20 +87,20 @@ bool ParamTraits<NPVariant_Param>::Read(const Message* m, return false; bool result = false; - r->type = static_cast<NPVariant_ParamEnum>(type); - if (r->type == NPVARIANT_PARAM_BOOL) { + r->type = static_cast<content::NPVariant_ParamEnum>(type); + if (r->type == content::NPVARIANT_PARAM_BOOL) { result = ReadParam(m, iter, &r->bool_value); - } else if (r->type == NPVARIANT_PARAM_INT) { + } else if (r->type == content::NPVARIANT_PARAM_INT) { result = ReadParam(m, iter, &r->int_value); - } else if (r->type == NPVARIANT_PARAM_DOUBLE) { + } else if (r->type == content::NPVARIANT_PARAM_DOUBLE) { result = ReadParam(m, iter, &r->double_value); - } else if (r->type == NPVARIANT_PARAM_STRING) { + } else if (r->type == content::NPVARIANT_PARAM_STRING) { result = ReadParam(m, iter, &r->string_value); - } else if (r->type == NPVARIANT_PARAM_SENDER_OBJECT_ROUTING_ID || - r->type == NPVARIANT_PARAM_RECEIVER_OBJECT_ROUTING_ID) { + } else if (r->type == content::NPVARIANT_PARAM_SENDER_OBJECT_ROUTING_ID || + r->type == content::NPVARIANT_PARAM_RECEIVER_OBJECT_ROUTING_ID) { result = ReadParam(m, iter, &r->npobject_routing_id); - } else if ((r->type == NPVARIANT_PARAM_VOID) || - (r->type == NPVARIANT_PARAM_NULL)) { + } else if ((r->type == content::NPVARIANT_PARAM_VOID) || + (r->type == content::NPVARIANT_PARAM_NULL)) { result = true; } else { NOTREACHED(); @@ -103,16 +111,16 @@ bool ParamTraits<NPVariant_Param>::Read(const Message* m, void ParamTraits<NPVariant_Param>::Log(const param_type& p, std::string* l) { l->append(StringPrintf("NPVariant_Param(%d, ", static_cast<int>(p.type))); - if (p.type == NPVARIANT_PARAM_BOOL) { + if (p.type == content::NPVARIANT_PARAM_BOOL) { LogParam(p.bool_value, l); - } else if (p.type == NPVARIANT_PARAM_INT) { + } else if (p.type == content::NPVARIANT_PARAM_INT) { LogParam(p.int_value, l); - } else if (p.type == NPVARIANT_PARAM_DOUBLE) { + } else if (p.type == content::NPVARIANT_PARAM_DOUBLE) { LogParam(p.double_value, l); - } else if (p.type == NPVARIANT_PARAM_STRING) { + } else if (p.type == content::NPVARIANT_PARAM_STRING) { LogParam(p.string_value, l); - } else if (p.type == NPVARIANT_PARAM_SENDER_OBJECT_ROUTING_ID || - p.type == NPVARIANT_PARAM_RECEIVER_OBJECT_ROUTING_ID) { + } else if (p.type == content::NPVARIANT_PARAM_SENDER_OBJECT_ROUTING_ID || + p.type == content::NPVARIANT_PARAM_RECEIVER_OBJECT_ROUTING_ID) { LogParam(p.npobject_routing_id, l); } else { l->append("<none>"); |