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

Unified Diff: mojo/public/bindings/lib/array.cc

Issue 220243007: Mojo: Move mojo/public/bindings/lib to mojo/public/cpp/bindings/lib. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 9 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « mojo/public/bindings/lib/TODO ('k') | mojo/public/bindings/lib/array_internal.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: mojo/public/bindings/lib/array.cc
diff --git a/mojo/public/bindings/lib/array.cc b/mojo/public/bindings/lib/array.cc
deleted file mode 100644
index 6745adcdbd5c7fbc2dbc51706e67163f50bb7343..0000000000000000000000000000000000000000
--- a/mojo/public/bindings/lib/array.cc
+++ /dev/null
@@ -1,38 +0,0 @@
-// Copyright 2013 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "mojo/public/cpp/bindings/array.h"
-
-namespace mojo {
-
-// static
-String TypeConverter<String, std::string>::ConvertFrom(const std::string& input,
- Buffer* buf) {
- String::Builder result(input.size(), buf);
- if (!input.empty())
- memcpy(&result[0], input.data(), input.size());
- return result.Finish();
-}
-// static
-std::string TypeConverter<String, std::string>::ConvertTo(const String& input) {
- if (input.is_null() || input.size() == 0)
- return std::string();
-
- return std::string(&input[0], &input[0] + input.size());
-}
-
-// static
-String TypeConverter<String, const char*>::ConvertFrom(const char* input,
- Buffer* buf) {
- if (!input)
- return String();
-
- size_t size = strlen(input);
- String::Builder result(size, buf);
- if (size != 0)
- memcpy(&result[0], input, size);
- return result.Finish();
-}
-
-} // namespace mojo
« no previous file with comments | « mojo/public/bindings/lib/TODO ('k') | mojo/public/bindings/lib/array_internal.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698