| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 133 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 144 LOG(WARNING) << "Max recursion depth hit in ReadValue."; | 144 LOG(WARNING) << "Max recursion depth hit in ReadValue."; |
| 145 return false; | 145 return false; |
| 146 } | 146 } |
| 147 | 147 |
| 148 int type; | 148 int type; |
| 149 if (!ReadParam(m, iter, &type)) | 149 if (!ReadParam(m, iter, &type)) |
| 150 return false; | 150 return false; |
| 151 | 151 |
| 152 switch (type) { | 152 switch (type) { |
| 153 case Value::TYPE_NULL: | 153 case Value::TYPE_NULL: |
| 154 *value = Value::CreateNullValue(); | 154 *value = base::NullValue(); |
| 155 break; | 155 break; |
| 156 case Value::TYPE_BOOLEAN: { | 156 case Value::TYPE_BOOLEAN: { |
| 157 bool val; | 157 bool val; |
| 158 if (!ReadParam(m, iter, &val)) | 158 if (!ReadParam(m, iter, &val)) |
| 159 return false; | 159 return false; |
| 160 *value = Value::CreateBooleanValue(val); | 160 *value = Value::CreateBooleanValue(val); |
| 161 break; | 161 break; |
| 162 } | 162 } |
| 163 case Value::TYPE_INTEGER: { | 163 case Value::TYPE_INTEGER: { |
| 164 int val; | 164 int val; |
| (...skipping 304 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 469 ReadParam(m, iter, &r->flags) && | 469 ReadParam(m, iter, &r->flags) && |
| 470 ReadParam(m, iter, &r->sent) && | 470 ReadParam(m, iter, &r->sent) && |
| 471 ReadParam(m, iter, &r->receive) && | 471 ReadParam(m, iter, &r->receive) && |
| 472 ReadParam(m, iter, &r->dispatch) && | 472 ReadParam(m, iter, &r->dispatch) && |
| 473 ReadParam(m, iter, &r->params); | 473 ReadParam(m, iter, &r->params); |
| 474 r->type = static_cast<uint16>(type); | 474 r->type = static_cast<uint16>(type); |
| 475 return result; | 475 return result; |
| 476 } | 476 } |
| 477 | 477 |
| 478 } // namespace IPC | 478 } // namespace IPC |
| OLD | NEW |