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

Side by Side Diff: mojo/public/bindings/lib/array.cc

Issue 218613010: Mojo: Move mojo/public/bindings/*.h to mojo/public/cpp/bindings/*.h. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 8 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
« no previous file with comments | « mojo/public/bindings/lib/DEPS ('k') | mojo/public/bindings/lib/array_internal.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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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 "mojo/public/bindings/array.h" 5 #include "mojo/public/cpp/bindings/array.h"
6 6
7 namespace mojo { 7 namespace mojo {
8 8
9 // static 9 // static
10 String TypeConverter<String, std::string>::ConvertFrom(const std::string& input, 10 String TypeConverter<String, std::string>::ConvertFrom(const std::string& input,
11 Buffer* buf) { 11 Buffer* buf) {
12 String::Builder result(input.size(), buf); 12 String::Builder result(input.size(), buf);
13 if (!input.empty()) 13 if (!input.empty())
14 memcpy(&result[0], input.data(), input.size()); 14 memcpy(&result[0], input.data(), input.size());
15 return result.Finish(); 15 return result.Finish();
(...skipping 13 matching lines...) Expand all
29 return String(); 29 return String();
30 30
31 size_t size = strlen(input); 31 size_t size = strlen(input);
32 String::Builder result(size, buf); 32 String::Builder result(size, buf);
33 if (size != 0) 33 if (size != 0)
34 memcpy(&result[0], input, size); 34 memcpy(&result[0], input, size);
35 return result.Finish(); 35 return result.Finish();
36 } 36 }
37 37
38 } // namespace mojo 38 } // namespace mojo
OLDNEW
« no previous file with comments | « mojo/public/bindings/lib/DEPS ('k') | mojo/public/bindings/lib/array_internal.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698