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

Unified Diff: net/base/default_trusted_spdy_proxy_provider.cc

Issue 1547273003: Set trusted SPDY proxy dynamically on per-profile basis (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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 side-by-side diff with in-line comments
Download patch
Index: net/base/default_trusted_spdy_proxy_provider.cc
diff --git a/net/base/default_trusted_spdy_proxy_provider.cc b/net/base/default_trusted_spdy_proxy_provider.cc
new file mode 100644
index 0000000000000000000000000000000000000000..1c1654527fd57c778afa424c1248de8039064dc1
--- /dev/null
+++ b/net/base/default_trusted_spdy_proxy_provider.cc
@@ -0,0 +1,35 @@
+// Copyright 2015 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/base/default_trusted_spdy_proxy_provider.h"
+
+#include "base/logging.h"
+
+namespace net {
+
+DefaultTrustedSpdyProxyProvider::DefaultTrustedSpdyProxyProvider(
+ const ProxyServer& trusted_spdy_proxy)
+ : trusted_spdy_proxy_(trusted_spdy_proxy), weak_factory_(this) {
+ DCHECK(thread_checker_.CalledOnValidThread());
+}
+
+DefaultTrustedSpdyProxyProvider::~DefaultTrustedSpdyProxyProvider() {
+ DCHECK(thread_checker_.CalledOnValidThread());
+}
+
+void DefaultTrustedSpdyProxyProvider::GetTrustedSpdyProxy(
+ ProxyServer* trusted_spdy_proxy) const {
+ DCHECK(thread_checker_.CalledOnValidThread());
+
+ *trusted_spdy_proxy = trusted_spdy_proxy_;
+}
+
+base::WeakPtr<TrustedSpdyProxyProvider>
+DefaultTrustedSpdyProxyProvider::GetWeakPtr() {
+ DCHECK(thread_checker_.CalledOnValidThread());
+
+ return weak_factory_.GetWeakPtr();
+}
+
+} // namespace net

Powered by Google App Engine
This is Rietveld 408576698