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

Side by Side Diff: chrome/browser/extensions/api/idltest/idltest_api.cc

Issue 16915006: Convert most of extensions and some other random stuff to using the base namespace for Values. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 6 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 | Annotate | Revision Log
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 "chrome/browser/extensions/api/idltest/idltest_api.h" 5 #include "chrome/browser/extensions/api/idltest/idltest_api.h"
6 6
7 #include "base/values.h" 7 #include "base/values.h"
8 8
9 using base::BinaryValue; 9 using base::BinaryValue;
10 10
11 namespace { 11 namespace {
12 12
13 ListValue* CopyBinaryValueToIntegerList(const BinaryValue* input) { 13 base::ListValue* CopyBinaryValueToIntegerList(const BinaryValue* input) {
14 ListValue* output = new ListValue(); 14 base::ListValue* output = new base::ListValue();
15 const char* input_buffer = input->GetBuffer(); 15 const char* input_buffer = input->GetBuffer();
16 for (size_t i = 0; i < input->GetSize(); i++) { 16 for (size_t i = 0; i < input->GetSize(); i++) {
17 output->Append(Value::CreateIntegerValue(input_buffer[i])); 17 output->Append(Value::CreateIntegerValue(input_buffer[i]));
18 } 18 }
19 return output; 19 return output;
20 } 20 }
21 21
22 } 22 }
23 23
24 bool IdltestSendArrayBufferFunction::RunImpl() { 24 bool IdltestSendArrayBufferFunction::RunImpl() {
(...skipping 10 matching lines...) Expand all
35 return true; 35 return true;
36 } 36 }
37 37
38 bool IdltestGetArrayBufferFunction::RunImpl() { 38 bool IdltestGetArrayBufferFunction::RunImpl() {
39 std::string hello = "hello world"; 39 std::string hello = "hello world";
40 BinaryValue* output = 40 BinaryValue* output =
41 BinaryValue::CreateWithCopiedBuffer(hello.c_str(), hello.size()); 41 BinaryValue::CreateWithCopiedBuffer(hello.c_str(), hello.size());
42 SetResult(output); 42 SetResult(output);
43 return true; 43 return true;
44 } 44 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698