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

Unified Diff: chrome/test/chromedriver/chrome/cpu_profile.h

Issue 275193003: [ChromeDriver] Expose CPU Profiling DevTools API into chromeWebDriver (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 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 side-by-side diff with in-line comments
Download patch
Index: chrome/test/chromedriver/chrome/cpu_profile.h
diff --git a/chrome/test/chromedriver/chrome/heap_snapshot_taker.h b/chrome/test/chromedriver/chrome/cpu_profile.h
similarity index 53%
copy from chrome/test/chromedriver/chrome/heap_snapshot_taker.h
copy to chrome/test/chromedriver/chrome/cpu_profile.h
index d0c233450353dcab91f2559288d5f0ca8c637c3a..535b672815736ec25e4e43fa2a5802cbefa4c536 100644
--- a/chrome/test/chromedriver/chrome/heap_snapshot_taker.h
+++ b/chrome/test/chromedriver/chrome/cpu_profile.h
@@ -2,15 +2,15 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#ifndef CHROME_TEST_CHROMEDRIVER_CHROME_HEAP_SNAPSHOT_TAKER_H_
-#define CHROME_TEST_CHROMEDRIVER_CHROME_HEAP_SNAPSHOT_TAKER_H_
+#ifndef CHROME_TEST_CHROMEDRIVER_CHROME_CPU_PROFILE_TAKER_H_
+#define CHROME_TEST_CHROMEDRIVER_CHROME_CPU_PROFILE_TAKER_H_
#include <string>
-
-#include "base/basictypes.h"
+#include "base/logging.h"
#include "base/compiler_specific.h"
#include "base/memory/scoped_ptr.h"
#include "chrome/test/chromedriver/chrome/devtools_event_listener.h"
+#include "chrome/test/chromedriver/chrome/status.h"
namespace base {
class DictionaryValue;
@@ -21,12 +21,15 @@ class DevToolsClient;
class Status;
// Take the heap snapshot.
-class HeapSnapshotTaker: public DevToolsEventListener {
+class CpuProfile: public DevToolsEventListener {
klm 2014/05/10 02:21:57 I believe the C++ style wants a space before the "
public:
- explicit HeapSnapshotTaker(DevToolsClient* client);
- virtual ~HeapSnapshotTaker();
+ explicit CpuProfile(DevToolsClient* client);
+ virtual ~CpuProfile();
- Status TakeSnapshot(scoped_ptr<base::Value>* snapshot);
+ Status InitProfileInternal();
klm 2014/05/10 02:21:57 These should be private.
+ Status StopProfileInternal();
+ Status StartProfile(scoped_ptr<base::Value>* snapshot);
+ Status EndProfile(scoped_ptr<base::Value>* snapshot);
// Overridden from DevToolsEventListener:
virtual Status OnEvent(DevToolsClient* client,
@@ -34,12 +37,12 @@ class HeapSnapshotTaker: public DevToolsEventListener {
const base::DictionaryValue& params) OVERRIDE;
private:
- Status TakeSnapshotInternal();
+ Status CpuProfileInternal();
klm 2014/05/10 02:21:57 This method seems to have no implementation define
DevToolsClient* client_;
std::string snapshot_;
- DISALLOW_COPY_AND_ASSIGN(HeapSnapshotTaker);
+ DISALLOW_COPY_AND_ASSIGN(CpuProfile);
};
-#endif // CHROME_TEST_CHROMEDRIVER_CHROME_HEAP_SNAPSHOT_TAKER_H_
+#endif // CHROME_TEST_CHROMEDRIVER_CHROME_CPU_PROFILE_TAKER_H_
« no previous file with comments | « no previous file | chrome/test/chromedriver/chrome/cpu_profile.cc » ('j') | chrome/test/chromedriver/chrome/cpu_profile.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698