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

Side by Side Diff: ipc/ipc_message_utils.cc

Issue 10837044: Correct const accessors in base/values.(h|cc), Part II (ListValue) (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: David's comments Created 8 years, 4 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
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/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 99 matching lines...) Expand 10 before | Expand all | Expand 10 after
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: {
117 const ListValue* list = static_cast<const ListValue*>(value); 117 const ListValue* list = static_cast<const ListValue*>(value);
118 WriteParam(m, static_cast<int>(list->GetSize())); 118 WriteParam(m, static_cast<int>(list->GetSize()));
119 for (size_t i = 0; i < list->GetSize(); ++i) { 119 for (size_t i = 0; i < list->GetSize(); ++i) {
120 Value* subval; 120 const Value* subval;
121 if (list->Get(i, &subval)) { 121 if (list->Get(i, &subval)) {
122 WriteValue(m, subval, recursion + 1); 122 WriteValue(m, subval, recursion + 1);
123 } else { 123 } else {
124 NOTREACHED() << "ListValue::GetSize is a filthy liar."; 124 NOTREACHED() << "ListValue::GetSize is a filthy liar.";
125 } 125 }
126 } 126 }
127 break; 127 break;
128 } 128 }
129 } 129 }
130 } 130 }
(...skipping 709 matching lines...) Expand 10 before | Expand all | Expand 10 after
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
OLDNEW
« no previous file with comments | « content/renderer/v8_value_converter_impl.cc ('k') | ppapi/shared_impl/private/ppb_x509_certificate_private_shared.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698