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/files/file_path.h" | 7 #include "base/files/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/strings/nullable_string16.h" | 10 #include "base/strings/nullable_string16.h" |
(...skipping 161 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
172 LOG(WARNING) << "Max recursion depth hit in ReadValue."; | 172 LOG(WARNING) << "Max recursion depth hit in ReadValue."; |
173 return false; | 173 return false; |
174 } | 174 } |
175 | 175 |
176 int type; | 176 int type; |
177 if (!ReadParam(m, iter, &type)) | 177 if (!ReadParam(m, iter, &type)) |
178 return false; | 178 return false; |
179 | 179 |
180 switch (type) { | 180 switch (type) { |
181 case base::Value::TYPE_NULL: | 181 case base::Value::TYPE_NULL: |
182 *value = base::Value::CreateNullValue(); | 182 *value = base::Value::CreateNullValue().release(); |
183 break; | 183 break; |
184 case base::Value::TYPE_BOOLEAN: { | 184 case base::Value::TYPE_BOOLEAN: { |
185 bool val; | 185 bool val; |
186 if (!ReadParam(m, iter, &val)) | 186 if (!ReadParam(m, iter, &val)) |
187 return false; | 187 return false; |
188 *value = new base::FundamentalValue(val); | 188 *value = new base::FundamentalValue(val); |
189 break; | 189 break; |
190 } | 190 } |
191 case base::Value::TYPE_INTEGER: { | 191 case base::Value::TYPE_INTEGER: { |
192 int val; | 192 int val; |
(...skipping 636 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
829 return result; | 829 return result; |
830 } | 830 } |
831 | 831 |
832 void ParamTraits<MSG>::Log(const param_type& p, std::string* l) { | 832 void ParamTraits<MSG>::Log(const param_type& p, std::string* l) { |
833 l->append("<MSG>"); | 833 l->append("<MSG>"); |
834 } | 834 } |
835 | 835 |
836 #endif // OS_WIN | 836 #endif // OS_WIN |
837 | 837 |
838 } // namespace IPC | 838 } // namespace IPC |
OLD | NEW |