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

Unified Diff: mojo/public/bindings/allocation_scope.h

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, 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/mojo_public.gypi ('k') | mojo/public/bindings/array.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: mojo/public/bindings/allocation_scope.h
diff --git a/mojo/public/bindings/allocation_scope.h b/mojo/public/bindings/allocation_scope.h
deleted file mode 100644
index 05737b9cc6d10113120e4d93190a3faaff453577..0000000000000000000000000000000000000000
--- a/mojo/public/bindings/allocation_scope.h
+++ /dev/null
@@ -1,43 +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.
-
-#ifndef MOJO_PUBLIC_BINDINGS_ALLOCATION_SCOPE_H_
-#define MOJO_PUBLIC_BINDINGS_ALLOCATION_SCOPE_H_
-
-#include "mojo/public/bindings/lib/scratch_buffer.h"
-#include "mojo/public/cpp/system/macros.h"
-
-namespace mojo {
-
-// In order to allocate a Mojom-defined structure or mojo::Array<T> (including
-// mojo::String), an AllocationScope must first be allocated. Typically,
-// AllocationScope is placed on the stack before calls to build structs and
-// arrays. Such structs and arrays are valid so long as the corresponding
-// AllocationScope remains alive.
-//
-// AllocationScope instantiates a Buffer and sets it in thread local storage.
-// This Buffer instance can be retrieved using Buffer::current().
-//
-// EXAMPLE:
-//
-// mojo::AllocationScope scope;
-// mojo::String s = "hello world";
-// some_interface->SomeMethod(s);
-//
-class AllocationScope {
- public:
- AllocationScope() {}
- ~AllocationScope() {}
-
- Buffer* buffer() { return &buffer_; }
-
- private:
- internal::ScratchBuffer buffer_;
-
- MOJO_DISALLOW_COPY_AND_ASSIGN(AllocationScope);
-};
-
-} // namespace mojo
-
-#endif // MOJO_PUBLIC_BINDINGS_ALLOCATION_SCOPE_H_
« no previous file with comments | « mojo/mojo_public.gypi ('k') | mojo/public/bindings/array.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698