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

Side by Side Diff: blimp/engine/browser/font_data_fetcher_impl.cc

Issue 2629743003: Remove all blimp engine code (Closed)
Patch Set: Use consistent comment style in //chrome Created 3 years, 11 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 2016 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 #include "blimp/engine/browser/font_data_fetcher_impl.h"
6
7 #include <memory>
8
9 #include "base/memory/ptr_util.h"
10 #include "base/task_runner_util.h"
11
12 namespace blimp {
13 namespace engine {
14
15 namespace {
16 // This is a temporary implementation which return a empty SkStream.
17 std::unique_ptr<SkStream>
18 FetchFontStreamOnFileThread(const std::string& font_hash) {
19 return base::MakeUnique<SkMemoryStream>();
20 }
21
22 } // namespace
23
24 FontDataFetcherImpl::FontDataFetcherImpl(
25 scoped_refptr<base::SingleThreadTaskRunner> file_task_runner)
26 : file_task_runner_(file_task_runner) {
27 DCHECK(file_task_runner_);
28 }
29
30 FontDataFetcherImpl::~FontDataFetcherImpl() {
31 DCHECK(thread_checker_.CalledOnValidThread());
32 }
33
34 void FontDataFetcherImpl::FetchFontStream(
35 const std::string& font_hash, const FontResponseCallback& callback) const {
36 DCHECK(thread_checker_.CalledOnValidThread());
37
38 base::PostTaskAndReplyWithResult(
39 file_task_runner_.get(), FROM_HERE,
40 base::Bind(&FetchFontStreamOnFileThread, font_hash), callback);
41 }
42
43 } // namespace engine
44 } // namespace blimp
OLDNEW
« no previous file with comments | « blimp/engine/browser/font_data_fetcher_impl.h ('k') | blimp/engine/browser/font_data_fetcher_impl_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698