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

Side by Side Diff: remoting/host/gnubby_connection_factory.cc

Issue 138753005: Add gnubby authentication to remoting host (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 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 2014 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 "remoting/host/gnubby_connection_factory.h"
6
7 #include "base/lazy_instance.h"
8 #include "remoting/host/gnubby_auth_handler.h"
9 #include "remoting/host/gnubby_connection.h"
10
11 namespace remoting {
12
13 namespace {
14
15 class DefaultGnubbyConnectionFactory : public GnubbyConnectionFactory {
16 public:
17 DefaultGnubbyConnectionFactory();
18 virtual ~DefaultGnubbyConnectionFactory();
19
20 virtual GnubbyConnection* Create(
21 scoped_refptr<base::SingleThreadTaskRunner> network_task_runner,
22 GnubbyAuthHandler* auth_handler,
23 int connection_id,
24 net::StreamSocket* socket);
25
26 private:
27 DISALLOW_COPY_AND_ASSIGN(DefaultGnubbyConnectionFactory);
28 };
29
30 DefaultGnubbyConnectionFactory::DefaultGnubbyConnectionFactory() {}
31
32 DefaultGnubbyConnectionFactory::~DefaultGnubbyConnectionFactory() {}
33
34 GnubbyConnection* DefaultGnubbyConnectionFactory::Create(
35 scoped_refptr<base::SingleThreadTaskRunner> network_task_runner,
36 GnubbyAuthHandler* auth_handler,
37 int connection_id,
38 net::StreamSocket* socket) {
39 return new GnubbyConnection(
40 network_task_runner, auth_handler, connection_id, socket);
41 }
42
43 } // namespace
44
45 // The default GnubbyConnectionFactory instance.
46 static base::LazyInstance<DefaultGnubbyConnectionFactory> g_default_factory_ =
47 LAZY_INSTANCE_INITIALIZER;
48
49 GnubbyConnectionFactory::GnubbyConnectionFactory() {}
50
51 GnubbyConnectionFactory::~GnubbyConnectionFactory() {}
52
53 // static
54 GnubbyConnectionFactory* GnubbyConnectionFactory::GetDefaultFactory() {
55 return &g_default_factory_.Get();
56 }
57
58 } // namespace remoting
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698