Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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 #ifndef CHROME_TEST_CHROMEDRIVER_CHROME_HEAP_SNAPSHOT_TAKER_H_ | 5 #ifndef CHROME_TEST_CHROMEDRIVER_CHROME_CPU_PROFILE_TAKER_H_ |
| 6 #define CHROME_TEST_CHROMEDRIVER_CHROME_HEAP_SNAPSHOT_TAKER_H_ | 6 #define CHROME_TEST_CHROMEDRIVER_CHROME_CPU_PROFILE_TAKER_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 | 9 #include "base/logging.h" |
| 10 #include "base/basictypes.h" | |
| 11 #include "base/compiler_specific.h" | 10 #include "base/compiler_specific.h" |
| 12 #include "base/memory/scoped_ptr.h" | 11 #include "base/memory/scoped_ptr.h" |
| 13 #include "chrome/test/chromedriver/chrome/devtools_event_listener.h" | 12 #include "chrome/test/chromedriver/chrome/devtools_event_listener.h" |
| 13 #include "chrome/test/chromedriver/chrome/status.h" | |
| 14 | 14 |
| 15 namespace base { | 15 namespace base { |
| 16 class DictionaryValue; | 16 class DictionaryValue; |
| 17 class Value; | 17 class Value; |
| 18 } | 18 } |
| 19 | 19 |
| 20 class DevToolsClient; | 20 class DevToolsClient; |
| 21 class Status; | 21 class Status; |
| 22 | 22 |
| 23 // Take the heap snapshot. | 23 // Take the heap snapshot. |
| 24 class HeapSnapshotTaker: public DevToolsEventListener { | 24 class CpuProfile: public DevToolsEventListener { |
|
klm
2014/05/10 02:21:57
I believe the C++ style wants a space before the "
| |
| 25 public: | 25 public: |
| 26 explicit HeapSnapshotTaker(DevToolsClient* client); | 26 explicit CpuProfile(DevToolsClient* client); |
| 27 virtual ~HeapSnapshotTaker(); | 27 virtual ~CpuProfile(); |
| 28 | 28 |
| 29 Status TakeSnapshot(scoped_ptr<base::Value>* snapshot); | 29 Status InitProfileInternal(); |
|
klm
2014/05/10 02:21:57
These should be private.
| |
| 30 Status StopProfileInternal(); | |
| 31 Status StartProfile(scoped_ptr<base::Value>* snapshot); | |
| 32 Status EndProfile(scoped_ptr<base::Value>* snapshot); | |
| 30 | 33 |
| 31 // Overridden from DevToolsEventListener: | 34 // Overridden from DevToolsEventListener: |
| 32 virtual Status OnEvent(DevToolsClient* client, | 35 virtual Status OnEvent(DevToolsClient* client, |
| 33 const std::string& method, | 36 const std::string& method, |
| 34 const base::DictionaryValue& params) OVERRIDE; | 37 const base::DictionaryValue& params) OVERRIDE; |
| 35 | 38 |
| 36 private: | 39 private: |
| 37 Status TakeSnapshotInternal(); | 40 Status CpuProfileInternal(); |
|
klm
2014/05/10 02:21:57
This method seems to have no implementation define
| |
| 38 | 41 |
| 39 DevToolsClient* client_; | 42 DevToolsClient* client_; |
| 40 std::string snapshot_; | 43 std::string snapshot_; |
| 41 | 44 |
| 42 DISALLOW_COPY_AND_ASSIGN(HeapSnapshotTaker); | 45 DISALLOW_COPY_AND_ASSIGN(CpuProfile); |
| 43 }; | 46 }; |
| 44 | 47 |
| 45 #endif // CHROME_TEST_CHROMEDRIVER_CHROME_HEAP_SNAPSHOT_TAKER_H_ | 48 #endif // CHROME_TEST_CHROMEDRIVER_CHROME_CPU_PROFILE_TAKER_H_ |
| OLD | NEW |