OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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/file_path.h" | 7 #include "base/file_path.h" |
8 #include "base/json/json_writer.h" | 8 #include "base/json/json_writer.h" |
9 #include "base/memory/scoped_ptr.h" | 9 #include "base/memory/scoped_ptr.h" |
10 #include "base/nullable_string16.h" | 10 #include "base/nullable_string16.h" |
(...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
96 m->WriteData(binary->GetBuffer(), static_cast<int>(binary->GetSize())); | 96 m->WriteData(binary->GetBuffer(), static_cast<int>(binary->GetSize())); |
97 break; | 97 break; |
98 } | 98 } |
99 case Value::TYPE_DICTIONARY: { | 99 case Value::TYPE_DICTIONARY: { |
100 const DictionaryValue* dict = static_cast<const DictionaryValue*>(value); | 100 const DictionaryValue* dict = static_cast<const DictionaryValue*>(value); |
101 | 101 |
102 WriteParam(m, static_cast<int>(dict->size())); | 102 WriteParam(m, static_cast<int>(dict->size())); |
103 | 103 |
104 for (DictionaryValue::key_iterator it = dict->begin_keys(); | 104 for (DictionaryValue::key_iterator it = dict->begin_keys(); |
105 it != dict->end_keys(); ++it) { | 105 it != dict->end_keys(); ++it) { |
106 Value* subval; | 106 const Value* subval; |
107 if (dict->GetWithoutPathExpansion(*it, &subval)) { | 107 if (dict->GetWithoutPathExpansion(*it, &subval)) { |
108 WriteParam(m, *it); | 108 WriteParam(m, *it); |
109 WriteValue(m, subval, recursion + 1); | 109 WriteValue(m, subval, recursion + 1); |
110 } else { | 110 } else { |
111 NOTREACHED() << "DictionaryValue iterators are filthy liars."; | 111 NOTREACHED() << "DictionaryValue iterators are filthy liars."; |
112 } | 112 } |
113 } | 113 } |
114 break; | 114 break; |
115 } | 115 } |
116 case Value::TYPE_LIST: { | 116 case Value::TYPE_LIST: { |
(...skipping 723 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
840 return result; | 840 return result; |
841 } | 841 } |
842 | 842 |
843 void ParamTraits<MSG>::Log(const param_type& p, std::string* l) { | 843 void ParamTraits<MSG>::Log(const param_type& p, std::string* l) { |
844 l->append("<MSG>"); | 844 l->append("<MSG>"); |
845 } | 845 } |
846 | 846 |
847 #endif // OS_WIN | 847 #endif // OS_WIN |
848 | 848 |
849 } // namespace IPC | 849 } // namespace IPC |
OLD | NEW |