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
3 // found in the LICENSE file.
5 #import "components/webp_transcode/webp_network_client_factory.h"
7 #include "base/logging.h"
8 #include "base/sequenced_task_runner.h"
9 #include "base/single_thread_task_runner.h"
10 #import "components/webp_transcode/webp_network_client.h"
12 @interface WebPNetworkClientFactory () {
13 scoped_refptr<base::SequencedTaskRunner> _taskRunner;
17 @implementation WebPNetworkClientFactory
19 - (instancetype)init {
20 NOTREACHED() << "Use |-initWithTaskRunner:| instead";
24 - (Class)clientClass {
25 return [WebPNetworkClient class];
28 - (instancetype)initWithTaskRunner:
29 (const scoped_refptr<base::SequencedTaskRunner>&)runner {
30 if ((self = [super init])) {
37 - (CRNForwardingNetworkClient*)clientHandlingAnyRequest {
39 [[[WebPNetworkClient alloc] initWithTaskRunner:_taskRunner] autorelease];