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

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: Reverting webdriver:Command::parameters_ to const 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
« no previous file with comments | « content/renderer/v8_value_converter_impl.cc ('k') | net/http/http_request_headers.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/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 85 matching lines...) Expand 10 before | Expand all | Expand 10 after
96 m->WriteData(binary->GetBuffer(), static_cast<int>(binary->GetSize())); 96 m->WriteData(binary->GetBuffer(), static_cast<int>(binary->GetSize()));
97 break; 97 break;
98 } 98 }
99 case Value::TYPE_DICTIONARY: { 99 case Value::TYPE_DICTIONARY: {
100 const DictionaryValue* dict = static_cast<const DictionaryValue*>(value); 100 const DictionaryValue* dict = static_cast<const DictionaryValue*>(value);
101 101
102 WriteParam(m, static_cast<int>(dict->size())); 102 WriteParam(m, static_cast<int>(dict->size()));
103 103
104 for (DictionaryValue::key_iterator it = dict->begin_keys(); 104 for (DictionaryValue::key_iterator it = dict->begin_keys();
105 it != dict->end_keys(); ++it) { 105 it != dict->end_keys(); ++it) {
106 Value* subval; 106 const Value* subval;
107 if (dict->GetWithoutPathExpansion(*it, &subval)) { 107 if (dict->GetWithoutPathExpansion(*it, &subval)) {
108 WriteParam(m, *it); 108 WriteParam(m, *it);
109 WriteValue(m, subval, recursion + 1); 109 WriteValue(m, subval, recursion + 1);
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: {
(...skipping 723 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') | net/http/http_request_headers.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698