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

Side by Side Diff: content/test/test_blink_web_unit_test_support.cc

Issue 2637843002: Migrate base::TaskRunner from Closure to OnceClosure (Closed)
Patch Set: rebase Created 3 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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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/test/test_blink_web_unit_test_support.h" 5 #include "content/test/test_blink_web_unit_test_support.h"
6 6
7 #include "base/callback.h" 7 #include "base/callback.h"
8 #include "base/feature_list.h" 8 #include "base/feature_list.h"
9 #include "base/files/file_path.h" 9 #include "base/files/file_path.h"
10 #include "base/files/file_util.h" 10 #include "base/files/file_util.h"
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
58 58
59 using blink::WebString; 59 using blink::WebString;
60 60
61 namespace { 61 namespace {
62 62
63 class DummyTaskRunner : public base::SingleThreadTaskRunner { 63 class DummyTaskRunner : public base::SingleThreadTaskRunner {
64 public: 64 public:
65 DummyTaskRunner() : thread_id_(base::PlatformThread::CurrentId()) {} 65 DummyTaskRunner() : thread_id_(base::PlatformThread::CurrentId()) {}
66 66
67 bool PostDelayedTask(const tracked_objects::Location& from_here, 67 bool PostDelayedTask(const tracked_objects::Location& from_here,
68 base::Closure task, 68 base::OnceClosure task,
69 base::TimeDelta delay) override { 69 base::TimeDelta delay) override {
70 // Drop the delayed task. 70 // Drop the delayed task.
71 return false; 71 return false;
72 } 72 }
73 73
74 bool PostNonNestableDelayedTask(const tracked_objects::Location& from_here, 74 bool PostNonNestableDelayedTask(const tracked_objects::Location& from_here,
75 base::Closure task, 75 base::OnceClosure task,
76 base::TimeDelta delay) override { 76 base::TimeDelta delay) override {
77 // Drop the delayed task. 77 // Drop the delayed task.
78 return false; 78 return false;
79 } 79 }
80 80
81 bool RunsTasksOnCurrentThread() const override { 81 bool RunsTasksOnCurrentThread() const override {
82 return thread_id_ == base::PlatformThread::CurrentId(); 82 return thread_id_ == base::PlatformThread::CurrentId();
83 } 83 }
84 84
85 protected: 85 protected:
(...skipping 247 matching lines...) Expand 10 before | Expand all | Expand 10 after
333 blink::WebRTCCertificateGenerator* 333 blink::WebRTCCertificateGenerator*
334 TestBlinkWebUnitTestSupport::createRTCCertificateGenerator() { 334 TestBlinkWebUnitTestSupport::createRTCCertificateGenerator() {
335 #if BUILDFLAG(ENABLE_WEBRTC) 335 #if BUILDFLAG(ENABLE_WEBRTC)
336 return new TestWebRTCCertificateGenerator(); 336 return new TestWebRTCCertificateGenerator();
337 #else 337 #else
338 return nullptr; 338 return nullptr;
339 #endif 339 #endif
340 } 340 }
341 341
342 } // namespace content 342 } // namespace content
OLDNEW
« no previous file with comments | « content/renderer/render_thread_impl_browsertest.cc ('k') | ios/chrome/app/application_delegate/app_state.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698