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

Side by Side Diff: ipc/ipc_message_utils.cc

Issue 2821028: Up the warnings in ipc (take 2)... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 10 years, 5 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2009 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "ipc/ipc_message_utils.h" 5 #include "ipc/ipc_message_utils.h"
6 6
7 #include "base/json/json_writer.h" 7 #include "base/json/json_writer.h"
8 #include "base/scoped_ptr.h" 8 #include "base/scoped_ptr.h"
9 #include "base/time.h" 9 #include "base/time.h"
10 #include "base/values.h" 10 #include "base/values.h"
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
48 break; 48 break;
49 } 49 }
50 case Value::TYPE_STRING: { 50 case Value::TYPE_STRING: {
51 std::string val; 51 std::string val;
52 value->GetAsString(&val); 52 value->GetAsString(&val);
53 WriteParam(m, val); 53 WriteParam(m, val);
54 break; 54 break;
55 } 55 }
56 case Value::TYPE_BINARY: { 56 case Value::TYPE_BINARY: {
57 const BinaryValue* binary = static_cast<const BinaryValue*>(value); 57 const BinaryValue* binary = static_cast<const BinaryValue*>(value);
58 m->WriteData(binary->GetBuffer(), binary->GetSize()); 58 m->WriteData(binary->GetBuffer(), static_cast<int>(binary->GetSize()));
59 break; 59 break;
60 } 60 }
61 case Value::TYPE_DICTIONARY: { 61 case Value::TYPE_DICTIONARY: {
62 const DictionaryValue* dict = static_cast<const DictionaryValue*>(value); 62 const DictionaryValue* dict = static_cast<const DictionaryValue*>(value);
63 63
64 WriteParam(m, static_cast<int>(dict->size())); 64 WriteParam(m, static_cast<int>(dict->size()));
65 65
66 for (DictionaryValue::key_iterator it = dict->begin_keys(); 66 for (DictionaryValue::key_iterator it = dict->begin_keys();
67 it != dict->end_keys(); ++it) { 67 it != dict->end_keys(); ++it) {
68 Value* subval; 68 Value* subval;
(...skipping 163 matching lines...) Expand 10 before | Expand all | Expand 10 after
232 232
233 return ReadListValue(m, iter, r, 0); 233 return ReadListValue(m, iter, r, 0);
234 } 234 }
235 235
236 void ParamTraits<ListValue>::Log(const param_type& p, std::wstring* l) { 236 void ParamTraits<ListValue>::Log(const param_type& p, std::wstring* l) {
237 std::string json; 237 std::string json;
238 base::JSONWriter::Write(&p, false, &json); 238 base::JSONWriter::Write(&p, false, &json);
239 l->append(UTF8ToWide(json)); 239 l->append(UTF8ToWide(json));
240 } 240 }
241 } // namespace IPC 241 } // namespace IPC
OLDNEW
« ipc/ipc_logging.cc ('K') | « ipc/ipc_logging.cc ('k') | ipc/ipc_sync_channel_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698