| OLD | NEW |
| 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 |
| OLD | NEW |