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

Unified Diff: mojo/public/cpp/bindings/lib/string_serialization.cc

Issue 814543006: Move //mojo/{public, edk} underneath //third_party (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 5 years, 11 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/cpp/bindings/lib/string_serialization.h ('k') | mojo/public/cpp/bindings/lib/template_util.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: mojo/public/cpp/bindings/lib/string_serialization.cc
diff --git a/mojo/public/cpp/bindings/lib/string_serialization.cc b/mojo/public/cpp/bindings/lib/string_serialization.cc
deleted file mode 100644
index e29d6f8c461ba7b5d13c9a1905161529fa1fd223..0000000000000000000000000000000000000000
--- a/mojo/public/cpp/bindings/lib/string_serialization.cc
+++ /dev/null
@@ -1,40 +0,0 @@
-// Copyright 2014 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/lib/string_serialization.h"
-
-#include <string.h>
-
-namespace mojo {
-
-size_t GetSerializedSize_(const String& input) {
- if (!input)
- return 0;
- return internal::Align(sizeof(internal::String_Data) + input.size());
-}
-
-void Serialize_(const String& input,
- internal::Buffer* buf,
- internal::String_Data** output) {
- if (input) {
- internal::String_Data* result =
- internal::String_Data::New(input.size(), buf);
- if (result)
- memcpy(result->storage(), input.data(), input.size());
- *output = result;
- } else {
- *output = nullptr;
- }
-}
-
-void Deserialize_(internal::String_Data* input, String* output) {
- if (input) {
- String result(input->storage(), input->size());
- result.Swap(output);
- } else {
- output->reset();
- }
-}
-
-} // namespace mojo
« no previous file with comments | « mojo/public/cpp/bindings/lib/string_serialization.h ('k') | mojo/public/cpp/bindings/lib/template_util.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698