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

Side by Side Diff: base/threading/thread_local_android.cc

Issue 1128653002: Cleanup base profiler initialization code. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: update thread_local_android.cc Created 5 years, 7 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 unified diff | Download patch
« no previous file with comments | « base/profiler/tracked_time_unittest.cc ('k') | base/threading/thread_local_storage.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "base/threading/thread_local.h" 5 #include "base/threading/thread_local.h"
6 6
7 #include "base/logging.h"
8
9 namespace base { 7 namespace base {
10 namespace internal { 8 namespace internal {
11 9
12 // static 10 // static
13 void ThreadLocalPlatform::AllocateSlot(SlotType* slot) { 11 void ThreadLocalPlatform::AllocateSlot(SlotType* slot) {
14 bool succeed = slot->Initialize(NULL); 12 slot->Initialize(nullptr);
15 CHECK(succeed);
16 } 13 }
17 14
18 // static 15 // static
19 void ThreadLocalPlatform::FreeSlot(SlotType slot) { 16 void ThreadLocalPlatform::FreeSlot(SlotType slot) {
20 slot.Free(); 17 slot.Free();
21 } 18 }
22 19
23 // static 20 // static
24 void* ThreadLocalPlatform::GetValueFromSlot(SlotType slot) { 21 void* ThreadLocalPlatform::GetValueFromSlot(SlotType slot) {
25 return slot.Get(); 22 return slot.Get();
26 } 23 }
27 24
28 // static 25 // static
29 void ThreadLocalPlatform::SetValueInSlot(SlotType slot, void* value) { 26 void ThreadLocalPlatform::SetValueInSlot(SlotType slot, void* value) {
30 slot.Set(value); 27 slot.Set(value);
31 } 28 }
32 29
33 } // namespace internal 30 } // namespace internal
34 } // namespace base 31 } // namespace base
OLDNEW
« no previous file with comments | « base/profiler/tracked_time_unittest.cc ('k') | base/threading/thread_local_storage.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698