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

Side by Side Diff: base/values.cc

Issue 251093: Modify extension request IPC messages to pass a ListValue instead of a string. (Closed)
Patch Set: notreached messages Created 11 years, 2 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 | « base/values.h ('k') | chrome/browser/automation/automation_extension_function.h » ('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) 2006-2008 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2006-2008 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 "base/logging.h" 5 #include "base/logging.h"
6 #include "base/string_util.h" 6 #include "base/string_util.h"
7 #include "base/values.h" 7 #include "base/values.h"
8 8
9 ///////////////////// Value //////////////////// 9 ///////////////////// Value ////////////////////
10 10
(...skipping 175 matching lines...) Expand 10 before | Expand all | Expand 10 after
186 186
187 // static 187 // static
188 BinaryValue* BinaryValue::Create(char* buffer, size_t size) { 188 BinaryValue* BinaryValue::Create(char* buffer, size_t size) {
189 if (!buffer) 189 if (!buffer)
190 return NULL; 190 return NULL;
191 191
192 return new BinaryValue(buffer, size); 192 return new BinaryValue(buffer, size);
193 } 193 }
194 194
195 // static 195 // static
196 BinaryValue* BinaryValue::CreateWithCopiedBuffer(char* buffer, size_t size) { 196 BinaryValue* BinaryValue::CreateWithCopiedBuffer(const char* buffer,
197 size_t size) {
197 if (!buffer) 198 if (!buffer)
198 return NULL; 199 return NULL;
199 200
200 char* buffer_copy = new char[size]; 201 char* buffer_copy = new char[size];
201 memcpy(buffer_copy, buffer, size); 202 memcpy(buffer_copy, buffer, size);
202 return new BinaryValue(buffer_copy, size); 203 return new BinaryValue(buffer_copy, size);
203 } 204 }
204 205
205 206
206 BinaryValue::BinaryValue(char* buffer, size_t size) 207 BinaryValue::BinaryValue(char* buffer, size_t size)
(...skipping 448 matching lines...) Expand 10 before | Expand all | Expand 10 after
655 lhs_it != end() && rhs_it != other_list->end(); 656 lhs_it != end() && rhs_it != other_list->end();
656 ++lhs_it, ++rhs_it) { 657 ++lhs_it, ++rhs_it) {
657 if (!(*lhs_it)->Equals(*rhs_it)) 658 if (!(*lhs_it)->Equals(*rhs_it))
658 return false; 659 return false;
659 } 660 }
660 if (lhs_it != end() || rhs_it != other_list->end()) 661 if (lhs_it != end() || rhs_it != other_list->end())
661 return false; 662 return false;
662 663
663 return true; 664 return true;
664 } 665 }
OLDNEW
« no previous file with comments | « base/values.h ('k') | chrome/browser/automation/automation_extension_function.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698