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

Side by Side Diff: chrome/browser/after_startup_task_utils.h

Issue 2823103003: Introduce TaskRunner::RunsTasksInCurrentSequence() (Closed)
Patch Set: rebase & remove inline keyword Created 3 years, 7 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 | « cc/tiles/image_controller_unittest.cc ('k') | chrome/browser/after_startup_task_utils.cc » ('j') | 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 #ifndef CHROME_BROWSER_AFTER_STARTUP_TASK_UTILS_H_ 5 #ifndef CHROME_BROWSER_AFTER_STARTUP_TASK_UTILS_H_
6 #define CHROME_BROWSER_AFTER_STARTUP_TASK_UTILS_H_ 6 #define CHROME_BROWSER_AFTER_STARTUP_TASK_UTILS_H_
7 7
8 #include "base/bind.h" 8 #include "base/bind.h"
9 #include "base/callback.h" 9 #include "base/callback.h"
10 #include "base/macros.h" 10 #include "base/macros.h"
(...skipping 10 matching lines...) Expand all
21 // AfterStartupTaskUtils::PostTask(). Doesn't support tasks with a non-zero 21 // AfterStartupTaskUtils::PostTask(). Doesn't support tasks with a non-zero
22 // delay. 22 // delay.
23 class Runner : public base::TaskRunner { 23 class Runner : public base::TaskRunner {
24 public: 24 public:
25 explicit Runner(scoped_refptr<base::TaskRunner> destination_runner); 25 explicit Runner(scoped_refptr<base::TaskRunner> destination_runner);
26 26
27 // Overrides from base::TaskRunner: 27 // Overrides from base::TaskRunner:
28 bool PostDelayedTask(const tracked_objects::Location& from_here, 28 bool PostDelayedTask(const tracked_objects::Location& from_here,
29 base::OnceClosure task, 29 base::OnceClosure task,
30 base::TimeDelta delay) override; 30 base::TimeDelta delay) override;
31 bool RunsTasksOnCurrentThread() const override; 31 bool RunsTasksInCurrentSequence() const override;
32 32
33 private: 33 private:
34 ~Runner() override; 34 ~Runner() override;
35 35
36 const scoped_refptr<base::TaskRunner> destination_runner_; 36 const scoped_refptr<base::TaskRunner> destination_runner_;
37 37
38 DISALLOW_COPY_AND_ASSIGN(Runner); 38 DISALLOW_COPY_AND_ASSIGN(Runner);
39 }; 39 };
40 40
41 // Observes startup and when complete runs tasks that have accrued. 41 // Observes startup and when complete runs tasks that have accrued.
(...skipping 23 matching lines...) Expand all
65 // SetBrowserStartupIsComplete() directly. Ideally it would use 65 // SetBrowserStartupIsComplete() directly. Ideally it would use
66 // StartMonitoringStartup() as the normal approach. 66 // StartMonitoringStartup() as the normal approach.
67 friend class android::AfterStartupTaskUtilsJNI; 67 friend class android::AfterStartupTaskUtilsJNI;
68 68
69 static void SetBrowserStartupIsComplete(); 69 static void SetBrowserStartupIsComplete();
70 70
71 DISALLOW_IMPLICIT_CONSTRUCTORS(AfterStartupTaskUtils); 71 DISALLOW_IMPLICIT_CONSTRUCTORS(AfterStartupTaskUtils);
72 }; 72 };
73 73
74 #endif // CHROME_BROWSER_AFTER_STARTUP_TASK_UTILS_H_ 74 #endif // CHROME_BROWSER_AFTER_STARTUP_TASK_UTILS_H_
OLDNEW
« no previous file with comments | « cc/tiles/image_controller_unittest.cc ('k') | chrome/browser/after_startup_task_utils.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698