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

Side by Side Diff: content/child/scheduler/null_idle_task_runner.cc

Issue 1025323003: Introduce a SchedulerHelper in content/child/scheduler (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 5 years, 8 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
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 "content/browser/appcache/mock_appcache_policy.h" 5 #include "content/child/scheduler/null_idle_task_runner.h"
6 6
7 namespace content { 7 namespace content {
8 8
9 MockAppCachePolicy::MockAppCachePolicy() 9 NullIdleTaskRunner::NullIdleTaskRunner()
10 : can_load_return_value_(true), can_create_return_value_(true) { 10 : SingleThreadIdleTaskRunner(nullptr,
11 nullptr,
12 base::Callback<void(base::TimeTicks*)>(),
13 "null.taskrunner") {
11 } 14 }
12 15
13 MockAppCachePolicy::~MockAppCachePolicy() { 16 NullIdleTaskRunner::~NullIdleTaskRunner() {
14 } 17 }
15 18
16 bool MockAppCachePolicy::CanLoadAppCache(const GURL& manifest_url, 19 void NullIdleTaskRunner::PostIdleTask(
17 const GURL& first_party) { 20 const tracked_objects::Location& from_here,
18 requested_manifest_url_ = manifest_url; 21 const IdleTask& idle_task) {
19 return can_load_return_value_;
20 } 22 }
21 23
22 bool MockAppCachePolicy::CanCreateAppCache(const GURL& manifest_url, 24 void NullIdleTaskRunner::PostNonNestableIdleTask(
23 const GURL& first_party) { 25 const tracked_objects::Location& from_here,
24 requested_manifest_url_ = manifest_url; 26 const IdleTask& idle_task) {
25 return can_create_return_value_; 27 }
28
29 void NullIdleTaskRunner::PostIdleTaskAfterWakeup(
30 const tracked_objects::Location& from_here,
31 const IdleTask& idle_task) {
26 } 32 }
27 33
28 } // namespace content 34 } // namespace content
OLDNEW
« no previous file with comments | « content/child/scheduler/null_idle_task_runner.h ('k') | content/child/scheduler/prioritizing_task_queue_selector.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698