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

Unified Diff: third_party/WebKit/Source/platform/scheduler/base/task_time_tracker.h

Issue 2258133002: [scheduler] Implement time-based cpu throttling. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Use double instead of base::TimeTicks Created 4 years, 3 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: third_party/WebKit/Source/platform/scheduler/base/task_time_tracker.h
diff --git a/third_party/WebKit/Source/platform/scheduler/base/task_queue_manager_delegate.h b/third_party/WebKit/Source/platform/scheduler/base/task_time_tracker.h
similarity index 30%
copy from third_party/WebKit/Source/platform/scheduler/base/task_queue_manager_delegate.h
copy to third_party/WebKit/Source/platform/scheduler/base/task_time_tracker.h
index 38c46321c70f4b0009c1f56c84dd41af2485e6d0..cae7f1fc242d240aae3c10db872ecce1ecacfaaa 100644
--- a/third_party/WebKit/Source/platform/scheduler/base/task_queue_manager_delegate.h
+++ b/third_party/WebKit/Source/platform/scheduler/base/task_time_tracker.h
@@ -2,35 +2,31 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#ifndef THIRD_PARTY_WEBKIT_SOURCE_PLATFORM_SCHEDULER_BASE_TASK_QUEUE_MANAGER_DELEGATE_H_
-#define THIRD_PARTY_WEBKIT_SOURCE_PLATFORM_SCHEDULER_BASE_TASK_QUEUE_MANAGER_DELEGATE_H_
+#ifndef THIRD_PARTY_WEBKIT_SOURCE_PLATFORM_SCHEDULER_BASE_TASK_TRACKER_H_
Sami 2016/09/12 17:49:09 TASK_TIME_TRACKER
altimin 2016/09/14 11:23:15 Deleted.
+#define THIRD_PARTY_WEBKIT_SOURCE_PLATFORM_SCHEDULER_BASE_TASK_TRACKER_H_
-#include "base/callback.h"
-#include "base/macros.h"
-#include "base/message_loop/message_loop.h"
-#include "base/time/tick_clock.h"
-#include "public/platform/WebCommon.h"
+#include "base/time/time.h"
namespace blink {
namespace scheduler {
+class TaskQueue;
-class BLINK_PLATFORM_EXPORT TaskQueueManagerDelegate
- : public base::SingleThreadTaskRunner,
- public base::TickClock {
+// Internal alternative to public TaskTimeObserver, exposing more information.
+class TaskTimeTracker {
alex clarke (OOO till 29th) 2016/09/12 17:45:26 Is this used?
altimin 2016/09/14 11:23:15 Deleted.
public:
- TaskQueueManagerDelegate() {}
+ TaskTimeTracker() {}
+ virtual ~TaskTimeTracker() {}
- // Returns true if the task runner is nested (i.e., running a run loop within
- // a nested task).
- virtual bool IsNested() const = 0;
+ virtual void OnTaskRunTimeReported(
+ TaskQueue* task_queue,
+ base::TimeTicks start_time,
+ base::TimeTicks end_time) = 0;
- protected:
- ~TaskQueueManagerDelegate() override {}
+ DISSALLOW_COPY_AND_ASSIGN(TaskTimeTracker);
Sami 2016/09/12 17:49:09 -S :) (It doesn't look like this file is being us
altimin 2016/09/14 11:23:15 Deleted.
- DISALLOW_COPY_AND_ASSIGN(TaskQueueManagerDelegate);
};
} // namespace scheduler
} // namespace blink
-#endif // THIRD_PARTY_WEBKIT_SOURCE_PLATFORM_SCHEDULER_BASE_TASK_QUEUE_MANAGER_DELEGATE_H_
+#endif // THIRD_PARTY_WEBKIT_SOURCE_PLATFORM_SCHEDULER_BASE_TASK_TRACKER_H_

Powered by Google App Engine
This is Rietveld 408576698