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

Side by Side Diff: chrome/profiling/profiling_globals.h

Issue 2937133002: Launch browser when --memlog is specified on the command line. (Closed)
Patch Set: Format Created 3 years, 6 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
(Empty)
1 // Copyright 2017 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #ifndef CHROME_PROFILING_PROFILING_GLOBALS_H_
6 #define CHROME_PROFILING_PROFILING_GLOBALS_H_
7
8 #include <memory>
9
10 #include "base/macros.h"
11 #include "base/memory/ref_counted.h"
12
13 namespace base {
14 class MessageLoopForUI;
15 class SingleThreadTaskRunner;
16 class TaskRunner;
17 class Thread;
18 } // namespace base
19
20 namespace profiling {
21
22 class ProfilingGlobals {
23 public:
24 static ProfilingGlobals* Get();
25
26 base::TaskRunner* GetIORunner();
27
28 // Returns non-null when inside RunMainMessageLoop. Call only on the
29 // main thread (otherwise there's a shutdown race).
30 scoped_refptr<base::SingleThreadTaskRunner> GetMainThread() const;
31
32 void RunMainMessageLoop();
33 void QuitWhenIdle();
34
35 private:
36 ProfilingGlobals();
37 ~ProfilingGlobals();
38
39 // Non-null inside RunMainMessageLoop.
40 base::MessageLoopForUI* main_message_loop_ = nullptr;
41
42 std::unique_ptr<base::Thread> io_thread_;
43
44 DISALLOW_COPY_AND_ASSIGN(ProfilingGlobals);
45 };
46
47 } // namespace profiling
48
49 #endif // CHROME_PROFILING_PROFILING_GLOBALS_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698