| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 "webkit/extensions/v8/heap_profiler_extension.h" | 5 #include "webkit/extensions/v8/heap_profiler_extension.h" |
| 6 | 6 |
| 7 #include "base/basictypes.h" | 7 #include "base/basictypes.h" |
| 8 #include "v8/include/v8.h" | 8 #include "v8/include/v8.h" |
| 9 | 9 |
| 10 #if defined(USE_TCMALLOC) && !defined(OS_WIN) | 10 #if defined(USE_TCMALLOC) && !defined(OS_WIN) |
| 11 #include "third_party/tcmalloc/chromium/src/gperftools/heap-profiler.h" | 11 #include "third_party/tcmalloc/chromium/src/google/heap-profiler.h" |
| 12 #endif | 12 #endif |
| 13 | 13 |
| 14 namespace extensions_v8 { | 14 namespace extensions_v8 { |
| 15 | 15 |
| 16 namespace { | 16 namespace { |
| 17 | 17 |
| 18 const char kHeapProfilerExtensionName[] = "v8/HeapProfiler"; | 18 const char kHeapProfilerExtensionName[] = "v8/HeapProfiler"; |
| 19 | 19 |
| 20 class HeapProfilerWrapper : public v8::Extension { | 20 class HeapProfilerWrapper : public v8::Extension { |
| 21 public: | 21 public: |
| (...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 103 #endif | 103 #endif |
| 104 }; | 104 }; |
| 105 | 105 |
| 106 } // namespace | 106 } // namespace |
| 107 | 107 |
| 108 v8::Extension* HeapProfilerExtension::Get() { | 108 v8::Extension* HeapProfilerExtension::Get() { |
| 109 return new HeapProfilerWrapper; | 109 return new HeapProfilerWrapper; |
| 110 } | 110 } |
| 111 | 111 |
| 112 } // namespace extensions_v8 | 112 } // namespace extensions_v8 |
| OLD | NEW |