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

Unified Diff: mojo/public/environment/lib/buffer_tls.cc

Issue 218043002: Mojo: Move public/environment to public/cpp/environment. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebased 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/environment/lib/DEPS ('k') | mojo/public/environment/lib/buffer_tls_setup.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: mojo/public/environment/lib/buffer_tls.cc
diff --git a/mojo/public/environment/lib/buffer_tls.cc b/mojo/public/environment/lib/buffer_tls.cc
deleted file mode 100644
index fc31f0f771d1fcad6dabaef27cc4740a75de8194..0000000000000000000000000000000000000000
--- a/mojo/public/environment/lib/buffer_tls.cc
+++ /dev/null
@@ -1,37 +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/environment/buffer_tls.h"
-
-#include <assert.h>
-
-#include "mojo/public/cpp/utility/lib/thread_local.h"
-#include "mojo/public/environment/lib/buffer_tls_setup.h"
-
-namespace mojo {
-namespace internal {
-
-static ThreadLocalPointer<Buffer> current_buffer;
-
-void SetUpCurrentBuffer() {
- current_buffer.Allocate();
-}
-
-void TearDownCurrentBuffer() {
- assert(!current_buffer.Get());
- current_buffer.Free();
-}
-
-Buffer* GetCurrentBuffer() {
- return current_buffer.Get();
-}
-
-Buffer* SetCurrentBuffer(Buffer* buf) {
- Buffer* old_buf = current_buffer.Get();
- current_buffer.Set(buf);
- return old_buf;
-}
-
-} // namespace internal
-} // namespace mojo
« no previous file with comments | « mojo/public/environment/lib/DEPS ('k') | mojo/public/environment/lib/buffer_tls_setup.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698