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

Unified Diff: mojo/public/cpp/bindings/string_traits_standard.h

Issue 2608513002: Remove mojo::String. (Closed)
Patch Set: rebase Created 3 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « mojo/public/cpp/bindings/string.h ('k') | mojo/public/cpp/bindings/struct_traits.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: mojo/public/cpp/bindings/string_traits_standard.h
diff --git a/mojo/public/cpp/bindings/string_traits_standard.h b/mojo/public/cpp/bindings/string_traits_standard.h
deleted file mode 100644
index 9b78d2473ec8a419db00db260cc34c946db32897..0000000000000000000000000000000000000000
--- a/mojo/public/cpp/bindings/string_traits_standard.h
+++ /dev/null
@@ -1,31 +0,0 @@
-// Copyright 2016 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.
-
-#ifndef MOJO_PUBLIC_CPP_BINDINGS_STRING_TRAITS_STANDARD_H_
-#define MOJO_PUBLIC_CPP_BINDINGS_STRING_TRAITS_STANDARD_H_
-
-#include "mojo/public/cpp/bindings/string.h"
-#include "mojo/public/cpp/bindings/string_traits.h"
-
-namespace mojo {
-
-template <>
-struct StringTraits<String> {
- static bool IsNull(const String& input) { return input.is_null(); }
- static void SetToNull(String* output) { *output = nullptr; }
-
- static size_t GetSize(const String& input) { return input.size(); }
-
- static const char* GetData(const String& input) { return input.data(); }
-
- static bool Read(StringDataView input, String* output) {
- String result(input.storage(), input.size());
- result.Swap(output);
- return true;
- }
-};
-
-} // namespace mojo
-
-#endif // MOJO_PUBLIC_CPP_BINDINGS_STRING_TRAITS_STANDARD_H_
« no previous file with comments | « mojo/public/cpp/bindings/string.h ('k') | mojo/public/cpp/bindings/struct_traits.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698