OLD | NEW |
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 #include "net/http/transport_security_persister.h" | 5 #include "net/http/transport_security_persister.h" |
6 | 6 |
7 #include "base/base64.h" | 7 #include "base/base64.h" |
8 #include "base/bind.h" | 8 #include "base/bind.h" |
9 #include "base/file_util.h" | 9 #include "base/file_util.h" |
10 #include "base/files/file_path.h" | 10 #include "base/files/file_path.h" |
(...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
90 } | 90 } |
91 | 91 |
92 } // namespace | 92 } // namespace |
93 | 93 |
94 | 94 |
95 namespace net { | 95 namespace net { |
96 | 96 |
97 TransportSecurityPersister::TransportSecurityPersister( | 97 TransportSecurityPersister::TransportSecurityPersister( |
98 TransportSecurityState* state, | 98 TransportSecurityState* state, |
99 const base::FilePath& profile_path, | 99 const base::FilePath& profile_path, |
100 const scoped_refptr<base::SequencedTaskRunner>& background_runner, | 100 base::SequencedTaskRunner* background_runner, |
101 bool readonly) | 101 bool readonly) |
102 : transport_security_state_(state), | 102 : transport_security_state_(state), |
103 writer_(profile_path.AppendASCII("TransportSecurity"), background_runner), | 103 writer_(profile_path.AppendASCII("TransportSecurity"), background_runner), |
104 foreground_runner_(base::MessageLoop::current()->message_loop_proxy()), | 104 foreground_runner_(base::MessageLoop::current()->message_loop_proxy()), |
105 background_runner_(background_runner), | 105 background_runner_(background_runner), |
106 readonly_(readonly), | 106 readonly_(readonly), |
107 weak_ptr_factory_(this) { | 107 weak_ptr_factory_(this) { |
108 transport_security_state_->SetDelegate(this); | 108 transport_security_state_->SetDelegate(this); |
109 | 109 |
110 base::PostTaskAndReplyWithResult( | 110 base::PostTaskAndReplyWithResult( |
(...skipping 208 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
319 bool dirty = false; | 319 bool dirty = false; |
320 if (!LoadEntries(state, &dirty)) { | 320 if (!LoadEntries(state, &dirty)) { |
321 LOG(ERROR) << "Failed to deserialize state: " << state; | 321 LOG(ERROR) << "Failed to deserialize state: " << state; |
322 return; | 322 return; |
323 } | 323 } |
324 if (dirty) | 324 if (dirty) |
325 StateIsDirty(transport_security_state_); | 325 StateIsDirty(transport_security_state_); |
326 } | 326 } |
327 | 327 |
328 } // namespace net | 328 } // namespace net |
OLD | NEW |