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

Side by Side Diff: ipc/ipc_message_utils.cc

Issue 1129083003: More base::Values-related bare pointer -> scoped_ptr conversions (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix bad merge Created 5 years, 7 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
« no previous file with comments | « extensions/renderer/script_injection.cc ('k') | media/base/video_frame_unittest.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « extensions/renderer/script_injection.cc ('k') | media/base/video_frame_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698