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

Side by Side Diff: content/browser/font_list_async.cc

Issue 13458002: Use sequenced workers for the getting the system's font list. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: use sequenced workers Created 7 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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/public/browser/font_list_async.h" 5 #include "content/public/browser/font_list_async.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/values.h" 8 #include "base/values.h"
9 #include "content/common/font_list.h" 9 #include "content/common/font_list.h"
10 #include "content/public/browser/browser_thread.h" 10 #include "content/public/browser/browser_thread.h"
(...skipping 20 matching lines...) Expand all
31 31
32 } // namespace 32 } // namespace
33 33
34 void GetFontListAsync( 34 void GetFontListAsync(
35 const base::Callback<void(scoped_ptr<base::ListValue>)>& callback) { 35 const base::Callback<void(scoped_ptr<base::ListValue>)>& callback) {
36 BrowserThread::ID id; 36 BrowserThread::ID id;
37 bool well_known_thread = BrowserThread::GetCurrentThreadIdentifier(&id); 37 bool well_known_thread = BrowserThread::GetCurrentThreadIdentifier(&id);
38 DCHECK(well_known_thread) 38 DCHECK(well_known_thread)
39 << "Can only call GetFontList from a well-known thread."; 39 << "Can only call GetFontList from a well-known thread.";
40 40
41 BrowserThread::PostBlockingPoolTask(FROM_HERE, 41 BrowserThread::PostBlockingPoolSequencedTask(
42 kFontListSequenceToken,
43 FROM_HERE,
42 base::Bind(&GetFontListInBlockingPool, id, callback)); 44 base::Bind(&GetFontListInBlockingPool, id, callback));
43 } 45 }
44 46
45 } // namespace content 47 } // namespace content
OLDNEW
« no previous file with comments | « no previous file | content/browser/renderer_host/pepper/pepper_browser_font_singleton_host.cc » ('j') | content/common/font_list.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698