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

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

Issue 8340028: Salient parts of http://codereview.chromium.org/8392042/ (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Created 9 years, 1 month 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
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/browser/font_list_async.h" 5 #include "content/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/browser/browser_thread.h"
10 #include "content/common/font_list.h" 9 #include "content/common/font_list.h"
10 #include "content/public/browser/browser_thread.h"
11 11
12 namespace content { 12 namespace content {
13 13
14 namespace { 14 namespace {
15 15
16 // Just executes the given callback with the parameter. 16 // Just executes the given callback with the parameter.
17 void ReturnFontListToOriginalThread( 17 void ReturnFontListToOriginalThread(
18 const base::Callback<void(scoped_refptr<FontListResult>)>& callback, 18 const base::Callback<void(scoped_refptr<FontListResult>)>& callback,
19 scoped_refptr<FontListResult> result) { 19 scoped_refptr<FontListResult> result) {
20 callback.Run(result); 20 callback.Run(result);
(...skipping 21 matching lines...) Expand all
42 BrowserThread::ID id; 42 BrowserThread::ID id;
43 bool well_known_thread = BrowserThread::GetCurrentThreadIdentifier(&id); 43 bool well_known_thread = BrowserThread::GetCurrentThreadIdentifier(&id);
44 DCHECK(well_known_thread) 44 DCHECK(well_known_thread)
45 << "Can only call GetFontList from a well-known thread."; 45 << "Can only call GetFontList from a well-known thread.";
46 46
47 BrowserThread::PostTask(BrowserThread::FILE, FROM_HERE, 47 BrowserThread::PostTask(BrowserThread::FILE, FROM_HERE,
48 base::Bind(&GetFontListOnFileThread, id, callback)); 48 base::Bind(&GetFontListOnFileThread, id, callback));
49 } 49 }
50 50
51 } // namespace content 51 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698