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

Side by Side Diff: mojo/services/html_viewer/webscheduler_impl.cc

Issue 1022443002: Remove unused shutdown() function from WebSchedulerImpl. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 5 years, 9 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 unified diff | Download patch
« no previous file with comments | « mojo/services/html_viewer/webscheduler_impl.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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 // An implementation of WebThread in terms of base::MessageLoop and 5 // An implementation of WebThread in terms of base::MessageLoop and
6 // base::Thread 6 // base::Thread
7 7
8 #include "base/bind.h" 8 #include "base/bind.h"
9 #include "base/message_loop/message_loop.h" 9 #include "base/message_loop/message_loop.h"
10 #include "base/tracked_objects.h" 10 #include "base/tracked_objects.h"
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
45 long long delayMs) { 45 long long delayMs) {
46 scoped_ptr<blink::WebThread::Task> scoped_task(task); 46 scoped_ptr<blink::WebThread::Task> scoped_task(task);
47 tracked_objects::Location location(web_location.functionName(), 47 tracked_objects::Location location(web_location.functionName(),
48 web_location.fileName(), -1, nullptr); 48 web_location.fileName(), -1, nullptr);
49 task_runner_->PostDelayedTask( 49 task_runner_->PostDelayedTask(
50 location, 50 location,
51 base::Bind(&WebSchedulerImpl::RunTask, base::Passed(&scoped_task)), 51 base::Bind(&WebSchedulerImpl::RunTask, base::Passed(&scoped_task)),
52 base::TimeDelta::FromMilliseconds(delayMs)); 52 base::TimeDelta::FromMilliseconds(delayMs));
53 } 53 }
54 54
55 void WebSchedulerImpl::shutdown() {
56 task_runner_ = nullptr;
57 }
58
59 // static 55 // static
60 void WebSchedulerImpl::RunIdleTask( 56 void WebSchedulerImpl::RunIdleTask(
61 scoped_ptr<blink::WebScheduler::IdleTask> task) { 57 scoped_ptr<blink::WebScheduler::IdleTask> task) {
62 // TODO(davemoore) Implement idle scheduling. 58 // TODO(davemoore) Implement idle scheduling.
63 task->run(0); 59 task->run(0);
64 } 60 }
65 61
66 // static 62 // static
67 void WebSchedulerImpl::RunTask(scoped_ptr<blink::WebThread::Task> task) { 63 void WebSchedulerImpl::RunTask(scoped_ptr<blink::WebThread::Task> task) {
68 task->run(); 64 task->run();
69 } 65 }
70 66
71 } // namespace html_viewer 67 } // namespace html_viewer
OLDNEW
« no previous file with comments | « mojo/services/html_viewer/webscheduler_impl.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698