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

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

Issue 623213004: replace OVERRIDE and FINAL with override and final in net/ (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: undo unwanted change in comment Created 6 years, 2 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 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
58 public base::ImportantFileWriter::DataSerializer { 58 public base::ImportantFileWriter::DataSerializer {
59 public: 59 public:
60 TransportSecurityPersister( 60 TransportSecurityPersister(
61 TransportSecurityState* state, 61 TransportSecurityState* state,
62 const base::FilePath& profile_path, 62 const base::FilePath& profile_path,
63 const scoped_refptr<base::SequencedTaskRunner>& background_runner, 63 const scoped_refptr<base::SequencedTaskRunner>& background_runner,
64 bool readonly); 64 bool readonly);
65 virtual ~TransportSecurityPersister(); 65 virtual ~TransportSecurityPersister();
66 66
67 // Called by the TransportSecurityState when it changes its state. 67 // Called by the TransportSecurityState when it changes its state.
68 virtual void StateIsDirty(TransportSecurityState*) OVERRIDE; 68 virtual void StateIsDirty(TransportSecurityState*) override;
69 69
70 // ImportantFileWriter::DataSerializer: 70 // ImportantFileWriter::DataSerializer:
71 // 71 //
72 // Serializes |transport_security_state_| into |*output|. Returns true if 72 // Serializes |transport_security_state_| into |*output|. Returns true if
73 // all DomainStates were serialized correctly. 73 // all DomainStates were serialized correctly.
74 // 74 //
75 // The serialization format is JSON; the JSON represents a dictionary of 75 // The serialization format is JSON; the JSON represents a dictionary of
76 // host:DomainState pairs (host is a string). The DomainState is 76 // host:DomainState pairs (host is a string). The DomainState is
77 // represented as a dictionary containing the following keys and value 77 // represented as a dictionary containing the following keys and value
78 // types (not all keys will always be present): 78 // types (not all keys will always be present):
(...skipping 11 matching lines...) Expand all
90 // legacy key synonym "preloaded_spki_hashes" 90 // legacy key synonym "preloaded_spki_hashes"
91 // "bad_static_spki_hashes": list of strings 91 // "bad_static_spki_hashes": list of strings
92 // legacy key synonym "bad_preloaded_spki_hashes" 92 // legacy key synonym "bad_preloaded_spki_hashes"
93 // "dynamic_spki_hashes": list of strings 93 // "dynamic_spki_hashes": list of strings
94 // 94 //
95 // The JSON dictionary keys are strings containing 95 // The JSON dictionary keys are strings containing
96 // Base64(SHA256(TransportSecurityState::CanonicalizeHost(domain))). 96 // Base64(SHA256(TransportSecurityState::CanonicalizeHost(domain))).
97 // The reason for hashing them is so that the stored state does not 97 // The reason for hashing them is so that the stored state does not
98 // trivially reveal a user's browsing history to an attacker reading the 98 // trivially reveal a user's browsing history to an attacker reading the
99 // serialized state on disk. 99 // serialized state on disk.
100 virtual bool SerializeData(std::string* data) OVERRIDE; 100 virtual bool SerializeData(std::string* data) override;
101 101
102 // Clears any existing non-static entries, and then re-populates 102 // Clears any existing non-static entries, and then re-populates
103 // |transport_security_state_|. 103 // |transport_security_state_|.
104 // 104 //
105 // Sets |*dirty| to true if the new state differs from the persisted 105 // Sets |*dirty| to true if the new state differs from the persisted
106 // state; false otherwise. 106 // state; false otherwise.
107 bool LoadEntries(const std::string& serialized, bool* dirty); 107 bool LoadEntries(const std::string& serialized, bool* dirty);
108 108
109 private: 109 private:
110 // Populates |state| from the JSON string |serialized|. Returns true if 110 // Populates |state| from the JSON string |serialized|. Returns true if
(...skipping 19 matching lines...) Expand all
130 const bool readonly_; 130 const bool readonly_;
131 131
132 base::WeakPtrFactory<TransportSecurityPersister> weak_ptr_factory_; 132 base::WeakPtrFactory<TransportSecurityPersister> weak_ptr_factory_;
133 133
134 DISALLOW_COPY_AND_ASSIGN(TransportSecurityPersister); 134 DISALLOW_COPY_AND_ASSIGN(TransportSecurityPersister);
135 }; 135 };
136 136
137 } // namespace net 137 } // namespace net
138 138
139 #endif // NET_HTTP_TRANSPORT_SECURITY_PERSISTER_H_ 139 #endif // NET_HTTP_TRANSPORT_SECURITY_PERSISTER_H_
OLDNEW
« no previous file with comments | « net/http/proxy_connect_redirect_http_stream.h ('k') | net/http/transport_security_persister_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698