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

Unified Diff: content/common/content_param_traits.cc

Issue 11235068: Move the remaning files in content\common to the content namespace. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 8 years, 2 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 | « content/common/content_param_traits.h ('k') | content/common/debug_flags.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/common/content_param_traits.cc
===================================================================
--- content/common/content_param_traits.cc (revision 163632)
+++ content/common/content_param_traits.cc (working copy)
@@ -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() {
}
+} // 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<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 @@
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 @@
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>");
« no previous file with comments | « content/common/content_param_traits.h ('k') | content/common/debug_flags.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698