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

Side by Side Diff: ipc/ipc_message_utils.cc

Issue 10834004: Correct const accessors in base/values.(h|cc) (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: One more, Windows-only 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 80 matching lines...) Expand 10 before | Expand all | Expand 10 after
91 m->WriteData(binary->GetBuffer(), static_cast<int>(binary->GetSize())); 91 m->WriteData(binary->GetBuffer(), static_cast<int>(binary->GetSize()));
92 break; 92 break;
93 } 93 }
94 case Value::TYPE_DICTIONARY: { 94 case Value::TYPE_DICTIONARY: {
95 const DictionaryValue* dict = static_cast<const DictionaryValue*>(value); 95 const DictionaryValue* dict = static_cast<const DictionaryValue*>(value);
96 96
97 WriteParam(m, static_cast<int>(dict->size())); 97 WriteParam(m, static_cast<int>(dict->size()));
98 98
99 for (DictionaryValue::key_iterator it = dict->begin_keys(); 99 for (DictionaryValue::key_iterator it = dict->begin_keys();
100 it != dict->end_keys(); ++it) { 100 it != dict->end_keys(); ++it) {
101 Value* subval; 101 const Value* subval;
102 if (dict->GetWithoutPathExpansion(*it, &subval)) { 102 if (dict->GetWithoutPathExpansion(*it, &subval)) {
103 WriteParam(m, *it); 103 WriteParam(m, *it);
104 WriteValue(m, subval, recursion + 1); 104 WriteValue(m, subval, recursion + 1);
105 } else { 105 } else {
106 NOTREACHED() << "DictionaryValue iterators are filthy liars."; 106 NOTREACHED() << "DictionaryValue iterators are filthy liars.";
107 } 107 }
108 } 108 }
109 break; 109 break;
110 } 110 }
111 case Value::TYPE_LIST: { 111 case Value::TYPE_LIST: {
(...skipping 723 matching lines...) Expand 10 before | Expand all | Expand 10 after
835 return result; 835 return result;
836 } 836 }
837 837
838 void ParamTraits<MSG>::Log(const param_type& p, std::string* l) { 838 void ParamTraits<MSG>::Log(const param_type& p, std::string* l) {
839 l->append("<MSG>"); 839 l->append("<MSG>");
840 } 840 }
841 841
842 #endif // OS_WIN 842 #endif // OS_WIN
843 843
844 } // namespace IPC 844 } // namespace IPC
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698