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

Side by Side Diff: content/child/mojo/type_converters.h

Issue 1544273002: Switch to standard integer types in content/. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 12 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/child/mojo/mojo_application.cc ('k') | content/child/multipart_response_delegate.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 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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 <stddef.h>
6
5 #include "mojo/public/cpp/bindings/array.h" 7 #include "mojo/public/cpp/bindings/array.h"
6 #include "third_party/WebKit/public/platform/WebVector.h" 8 #include "third_party/WebKit/public/platform/WebVector.h"
7 9
8 namespace mojo { 10 namespace mojo {
9 11
10 template <typename T, typename U> 12 template <typename T, typename U>
11 struct TypeConverter<Array<T>, blink::WebVector<U>> { 13 struct TypeConverter<Array<T>, blink::WebVector<U>> {
12 static Array<T> Convert(const blink::WebVector<U>& vector) { 14 static Array<T> Convert(const blink::WebVector<U>& vector) {
13 Array<T> array(vector.size()); 15 Array<T> array(vector.size());
14 for (size_t i = 0; i < vector.size(); ++i) 16 for (size_t i = 0; i < vector.size(); ++i)
15 array[i] = TypeConverter<T, U>::Convert(vector[i]); 17 array[i] = TypeConverter<T, U>::Convert(vector[i]);
16 return array.Pass(); 18 return array.Pass();
17 } 19 }
18 }; 20 };
19 21
20 } // namespace mojo 22 } // namespace mojo
OLDNEW
« no previous file with comments | « content/child/mojo/mojo_application.cc ('k') | content/child/multipart_response_delegate.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698