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

Side by Side Diff: net/base/default_trusted_spdy_proxy_provider.h

Issue 1547273003: Set trusted SPDY proxy dynamically on per-profile basis (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Addressed comments Created 4 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 2015 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 #ifndef NET_BASE_DEFAULT_TRUSTED_SPDY_PROXY_PROVIDER_H_
6 #define NET_BASE_DEFAULT_TRUSTED_SPDY_PROXY_PROVIDER_H_
7
8 #include "base/macros.h"
9 #include "base/memory/weak_ptr.h"
10 #include "base/threading/thread_checker.h"
11 #include "net/base/net_export.h"
12 #include "net/base/trusted_spdy_proxy_provider.h"
13 #include "net/proxy/proxy_server.h"
14
15 namespace net {
16
17 // DefaultTrustedSpdyProxyProvider implements TrustedSpdyProxyProvider, and
18 // returns the proxy that was set during the time of construction.
19 class NET_EXPORT_PRIVATE DefaultTrustedSpdyProxyProvider
20 : public TrustedSpdyProxyProvider {
21 public:
22 explicit DefaultTrustedSpdyProxyProvider(
23 const ProxyServer& trusted_spdy_proxy);
24 ~DefaultTrustedSpdyProxyProvider() override;
25
26 // Sets |trusted_spdy_proxy| to the trusted SPDY proxy. May be overriden.
27 void GetTrustedSpdyProxy(ProxyServer* trusted_spdy_proxy) const override;
28
29 base::WeakPtr<TrustedSpdyProxyProvider> GetWeakPtr() override;
30
31 private:
32 const ProxyServer trusted_spdy_proxy_;
33
34 base::ThreadChecker thread_checker_;
35
36 base::WeakPtrFactory<TrustedSpdyProxyProvider> weak_factory_;
37
38 DISALLOW_COPY_AND_ASSIGN(DefaultTrustedSpdyProxyProvider);
39 };
40
41 } // namespace net
42
43 #endif // NET_BASE_DEFAULT_TRUSTED_SPDY_PROXY_PROVIDER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698