summaryrefslogtreecommitdiffstats
path: root/net/socket_stream/socket_stream_job.cc
blob: c8849a5a91d2310c4790e59cc0915dfa52f187b2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
// Copyright (c) 2010 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#include "net/socket_stream/socket_stream_job.h"

#include "net/socket_stream/socket_stream_job_manager.h"

namespace net {

static SocketStreamJobManager* GetJobManager() {
  return Singleton<SocketStreamJobManager>::get();
}

// static
SocketStreamJob::ProtocolFactory* SocketStreamJob::RegisterProtocolFactory(
    const std::string& scheme, ProtocolFactory* factory) {
  return GetJobManager()->RegisterProtocolFactory(scheme, factory);
}

// static
SocketStreamJob* SocketStreamJob::CreateSocketStreamJob(
    const GURL& url, SocketStream::Delegate* delegate) {
  return GetJobManager()->CreateJob(url, delegate);
}

}  // namespace net