OLD | NEW |
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/common/font_list.h" | 5 #include "content/common/font_list.h" |
6 | 6 |
| 7 #include "base/lazy_instance.h" |
| 8 #include "base/task_scheduler/post_task.h" |
| 9 |
7 namespace content { | 10 namespace content { |
8 const char kFontListSequenceToken[] = "_font_list_sequence_token_"; | 11 |
| 12 namespace { |
| 13 |
| 14 struct FontListTaskRunner { |
| 15 const scoped_refptr<base::SequencedTaskRunner> task_runner = |
| 16 base::CreateSequencedTaskRunnerWithTraits( |
| 17 {base::MayBlock(), base::TaskPriority::USER_VISIBLE}); |
| 18 }; |
| 19 |
| 20 base::LazyInstance<FontListTaskRunner>::Leaky g_font_list_task_runner = |
| 21 LAZY_INSTANCE_INITIALIZER; |
| 22 |
| 23 } // namespace |
| 24 |
| 25 scoped_refptr<base::SequencedTaskRunner> GetFontListTaskRunner() { |
| 26 return g_font_list_task_runner.Get().task_runner; |
9 } | 27 } |
| 28 |
| 29 } // content |
OLD | NEW |