| 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 "chrome/browser/net/transport_security_persister.h" | 5 #include "chrome/browser/net/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" |
| 11 #include "base/json/json_reader.h" | 11 #include "base/json/json_reader.h" |
| 12 #include "base/json/json_writer.h" | 12 #include "base/json/json_writer.h" |
| 13 #include "base/message_loop.h" | 13 #include "base/message_loop.h" |
| 14 #include "base/path_service.h" | 14 #include "base/path_service.h" |
| 15 #include "base/values.h" | 15 #include "base/values.h" |
| 16 #include "chrome/common/chrome_paths.h" | 16 #include "chrome/common/chrome_paths.h" |
| 17 #include "content/public/browser/browser_thread.h" | 17 #include "content/public/browser/browser_thread.h" |
| 18 #include "crypto/sha2.h" | 18 #include "crypto/sha2.h" |
| 19 #include "net/base/x509_certificate.h" | 19 #include "net/cert/x509_certificate.h" |
| 20 #include "net/http/transport_security_state.h" | 20 #include "net/http/transport_security_state.h" |
| 21 | 21 |
| 22 using content::BrowserThread; | 22 using content::BrowserThread; |
| 23 using net::HashValue; | 23 using net::HashValue; |
| 24 using net::HashValueTag; | 24 using net::HashValueTag; |
| 25 using net::HashValueVector; | 25 using net::HashValueVector; |
| 26 using net::TransportSecurityState; | 26 using net::TransportSecurityState; |
| 27 | 27 |
| 28 namespace { | 28 namespace { |
| 29 | 29 |
| (...skipping 291 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 321 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO)); | 321 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO)); |
| 322 | 322 |
| 323 bool dirty = false; | 323 bool dirty = false; |
| 324 if (!LoadEntries(state, &dirty)) { | 324 if (!LoadEntries(state, &dirty)) { |
| 325 LOG(ERROR) << "Failed to deserialize state: " << state; | 325 LOG(ERROR) << "Failed to deserialize state: " << state; |
| 326 return; | 326 return; |
| 327 } | 327 } |
| 328 if (dirty) | 328 if (dirty) |
| 329 StateIsDirty(transport_security_state_); | 329 StateIsDirty(transport_security_state_); |
| 330 } | 330 } |
| OLD | NEW |