| OLD | NEW |
| 1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2006-2008 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/stats_table.h" | 5 #include "base/stats_table.h" |
| 6 | 6 |
| 7 #include "base/logging.h" | 7 #include "base/logging.h" |
| 8 #include "base/platform_thread.h" | 8 #include "base/platform_thread.h" |
| 9 #include "base/process_util.h" | 9 #include "base/process_util.h" |
| 10 #include "base/scoped_ptr.h" |
| 10 #include "base/shared_memory.h" | 11 #include "base/shared_memory.h" |
| 11 #include "base/string_piece.h" | 12 #include "base/string_piece.h" |
| 12 #include "base/string_util.h" | 13 #include "base/string_util.h" |
| 13 #include "base/sys_string_conversions.h" | 14 #include "base/sys_string_conversions.h" |
| 14 #include "base/thread_local_storage.h" | 15 #include "base/thread_local_storage.h" |
| 15 | 16 |
| 16 #if defined(OS_POSIX) | 17 #if defined(OS_POSIX) |
| 17 #include "errno.h" | 18 #include "errno.h" |
| 18 #endif | 19 #endif |
| 19 | 20 |
| (...skipping 530 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 550 if (!slot && !(slot = table->RegisterThread(""))) | 551 if (!slot && !(slot = table->RegisterThread(""))) |
| 551 return NULL; | 552 return NULL; |
| 552 | 553 |
| 553 // Find the counter id for the counter. | 554 // Find the counter id for the counter. |
| 554 std::string str_name(name); | 555 std::string str_name(name); |
| 555 int counter = table->FindCounter(str_name); | 556 int counter = table->FindCounter(str_name); |
| 556 | 557 |
| 557 // Now we can find the location in the table. | 558 // Now we can find the location in the table. |
| 558 return table->GetLocation(counter, slot); | 559 return table->GetLocation(counter, slot); |
| 559 } | 560 } |
| OLD | NEW |