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

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

Issue 2937133002: Launch browser when --memlog is specified on the command line. (Closed)
Patch Set: Fix 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
« no previous file with comments | « chrome/profiling/DEPS ('k') | chrome/profiling/profiling_globals.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 #include "base/threading/thread.h"
13
14 namespace base {
15 class MessageLoopForUI;
16 class SingleThreadTaskRunner;
17 class TaskRunner;
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 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
« no previous file with comments | « chrome/profiling/DEPS ('k') | chrome/profiling/profiling_globals.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698