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

Unified Diff: chrome/browser/net/sth_distributor_provider.cc

Issue 2014573002: Certificate Transparency: Wire the TreeStateTracker up. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Addressing Lei's comments Created 4 years, 7 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
« no previous file with comments | « chrome/browser/net/sth_distributor_provider.h ('k') | chrome/browser/profiles/profile_io_data.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/net/sth_distributor_provider.cc
diff --git a/chrome/browser/net/sth_distributor_provider.cc b/chrome/browser/net/sth_distributor_provider.cc
new file mode 100644
index 0000000000000000000000000000000000000000..97a109e55d70703dce8b606181c87cd3546c9471
--- /dev/null
+++ b/chrome/browser/net/sth_distributor_provider.cc
@@ -0,0 +1,27 @@
+// Copyright 2016 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 "chrome/browser/net/sth_distributor_provider.h"
+
+#include "base/lazy_instance.h"
+#include "net/cert/sth_distributor.h"
+
+namespace chrome_browser_net {
+
+namespace {
+base::LazyInstance<std::unique_ptr<net::ct::STHDistributor>>
+ global_sth_distributor = LAZY_INSTANCE_INITIALIZER;
+} // namespace
+
+void SetGlobalSTHDistributor(
+ std::unique_ptr<net::ct::STHDistributor> distributor) {
+ global_sth_distributor.Get().swap(distributor);
+}
+
+net::ct::STHDistributor* GetGlobalSTHDistributor() {
+ CHECK(global_sth_distributor.Get());
+ return global_sth_distributor.Get().get();
+}
+
+} // namespace chrome_browser_net
« no previous file with comments | « chrome/browser/net/sth_distributor_provider.h ('k') | chrome/browser/profiles/profile_io_data.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698