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

Side by Side Diff: content/browser/signed_certificate_timestamp_store_impl.h

Issue 1308823002: Move Singleton and related structs to namespace base (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: ToT Created 5 years, 3 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
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef CONTENT_BROWSER_SIGNED_CERTIFICATE_TIMESTAMP_STORE_IMPL_H_ 5 #ifndef CONTENT_BROWSER_SIGNED_CERTIFICATE_TIMESTAMP_STORE_IMPL_H_
6 #define CONTENT_BROWSER_SIGNED_CERTIFICATE_TIMESTAMP_STORE_IMPL_H_ 6 #define CONTENT_BROWSER_SIGNED_CERTIFICATE_TIMESTAMP_STORE_IMPL_H_
7 7
8 #include "content/browser/renderer_data_memoizing_store.h" 8 #include "content/browser/renderer_data_memoizing_store.h"
9 #include "content/public/browser/signed_certificate_timestamp_store.h" 9 #include "content/public/browser/signed_certificate_timestamp_store.h"
10 #include "net/cert/signed_certificate_timestamp.h" 10 #include "net/cert/signed_certificate_timestamp.h"
11 11
12 namespace base {
12 template <typename T> struct DefaultSingletonTraits; 13 template <typename T> struct DefaultSingletonTraits;
14 }
13 15
14 namespace content { 16 namespace content {
15 17
16 class SignedCertificateTimestampStoreImpl 18 class SignedCertificateTimestampStoreImpl
17 : public SignedCertificateTimestampStore { 19 : public SignedCertificateTimestampStore {
18 public: 20 public:
19 // Returns the singleton instance of the SignedCertificateTimestampStore. 21 // Returns the singleton instance of the SignedCertificateTimestampStore.
20 static SignedCertificateTimestampStoreImpl* GetInstance(); 22 static SignedCertificateTimestampStoreImpl* GetInstance();
21 23
22 // SignedCertificateTimestampStore implementation: 24 // SignedCertificateTimestampStore implementation:
23 int Store(net::ct::SignedCertificateTimestamp* sct, 25 int Store(net::ct::SignedCertificateTimestamp* sct,
24 int render_process_host_id) override; 26 int render_process_host_id) override;
25 bool Retrieve( 27 bool Retrieve(
26 int sct_id, 28 int sct_id,
27 scoped_refptr<net::ct::SignedCertificateTimestamp>* sct) override; 29 scoped_refptr<net::ct::SignedCertificateTimestamp>* sct) override;
28 30
29 private: 31 private:
30 friend struct DefaultSingletonTraits<SignedCertificateTimestampStoreImpl>; 32 friend struct base::DefaultSingletonTraits<
33 SignedCertificateTimestampStoreImpl>;
31 34
32 SignedCertificateTimestampStoreImpl(); 35 SignedCertificateTimestampStoreImpl();
33 ~SignedCertificateTimestampStoreImpl() override; 36 ~SignedCertificateTimestampStoreImpl() override;
34 37
35 RendererDataMemoizingStore<net::ct::SignedCertificateTimestamp> store_; 38 RendererDataMemoizingStore<net::ct::SignedCertificateTimestamp> store_;
36 39
37 DISALLOW_COPY_AND_ASSIGN(SignedCertificateTimestampStoreImpl); 40 DISALLOW_COPY_AND_ASSIGN(SignedCertificateTimestampStoreImpl);
38 }; 41 };
39 42
40 } // namespace content 43 } // namespace content
41 44
42 #endif // CONTENT_BROWSER_SIGNED_CERTIFICATE_TIMESTAMP_STORE_IMPL_H_ 45 #endif // CONTENT_BROWSER_SIGNED_CERTIFICATE_TIMESTAMP_STORE_IMPL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698