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

Side by Side Diff: net/http/transport_security_persister.h

Issue 511163002: Net-related fixups for scoped_refptr conversion operator cleanup. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 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 (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 // TransportSecurityState maintains an in memory database containing the 5 // TransportSecurityState maintains an in memory database containing the
6 // list of hosts that currently have transport security enabled. This 6 // list of hosts that currently have transport security enabled. This
7 // singleton object deals with writing that data out to disk as needed and 7 // singleton object deals with writing that data out to disk as needed and
8 // loading it at startup. 8 // loading it at startup.
9 9
10 // At startup we need to load the transport security state from the 10 // At startup we need to load the transport security state from the
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
50 50
51 // Reads and updates on-disk TransportSecurity state. Clients of this class 51 // Reads and updates on-disk TransportSecurity state. Clients of this class
52 // should create, destroy, and call into it from one thread. 52 // should create, destroy, and call into it from one thread.
53 // 53 //
54 // file_task_runner is the task runner this class should use internally to 54 // file_task_runner is the task runner this class should use internally to
55 // perform file IO, and can optionally be associated with a different thread. 55 // perform file IO, and can optionally be associated with a different thread.
56 class NET_EXPORT TransportSecurityPersister 56 class NET_EXPORT TransportSecurityPersister
57 : public TransportSecurityState::Delegate, 57 : public TransportSecurityState::Delegate,
58 public base::ImportantFileWriter::DataSerializer { 58 public base::ImportantFileWriter::DataSerializer {
59 public: 59 public:
60 TransportSecurityPersister(TransportSecurityState* state, 60 TransportSecurityPersister(
61 const base::FilePath& profile_path, 61 TransportSecurityState* state,
62 base::SequencedTaskRunner* file_task_runner, 62 const base::FilePath& profile_path,
63 bool readonly); 63 const scoped_refptr<base::SequencedTaskRunner>& file_task_runner,
64 bool readonly);
64 virtual ~TransportSecurityPersister(); 65 virtual ~TransportSecurityPersister();
65 66
66 // Called by the TransportSecurityState when it changes its state. 67 // Called by the TransportSecurityState when it changes its state.
67 virtual void StateIsDirty(TransportSecurityState*) OVERRIDE; 68 virtual void StateIsDirty(TransportSecurityState*) OVERRIDE;
68 69
69 // ImportantFileWriter::DataSerializer: 70 // ImportantFileWriter::DataSerializer:
70 // 71 //
71 // Serializes |transport_security_state_| into |*output|. Returns true if 72 // Serializes |transport_security_state_| into |*output|. Returns true if
72 // all DomainStates were serialized correctly. 73 // all DomainStates were serialized correctly.
73 // 74 //
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after
129 const bool readonly_; 130 const bool readonly_;
130 131
131 base::WeakPtrFactory<TransportSecurityPersister> weak_ptr_factory_; 132 base::WeakPtrFactory<TransportSecurityPersister> weak_ptr_factory_;
132 133
133 DISALLOW_COPY_AND_ASSIGN(TransportSecurityPersister); 134 DISALLOW_COPY_AND_ASSIGN(TransportSecurityPersister);
134 }; 135 };
135 136
136 } // namespace net 137 } // namespace net
137 138
138 #endif // NET_HTTP_TRANSPORT_SECURITY_PERSISTER_H_ 139 #endif // NET_HTTP_TRANSPORT_SECURITY_PERSISTER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698