Index: net/http/transport_security_persister.cc |
diff --git a/net/http/transport_security_persister.cc b/net/http/transport_security_persister.cc |
index 08aa07e1c9112ae1d8046dfb59f3303d4240aea9..bc2d6697e4bcfefde2cae36e48bb7dd1a7a8fef9 100644 |
--- a/net/http/transport_security_persister.cc |
+++ b/net/http/transport_security_persister.cc |
@@ -94,7 +94,9 @@ TransportSecurityPersister::TransportSecurityPersister( |
const scoped_refptr<base::SequencedTaskRunner>& background_runner, |
bool readonly) |
: transport_security_state_(state), |
- writer_(profile_path.AppendASCII("TransportSecurity"), background_runner), |
+ writer_(new base::ImportantFileWriterImpl( |
+ profile_path.AppendASCII("TransportSecurity"), |
+ background_runner)), |
foreground_runner_(base::MessageLoop::current()->message_loop_proxy()), |
background_runner_(background_runner), |
readonly_(readonly), |
@@ -103,7 +105,7 @@ TransportSecurityPersister::TransportSecurityPersister( |
base::PostTaskAndReplyWithResult( |
background_runner_.get(), FROM_HERE, |
- base::Bind(&LoadState, writer_.path()), |
+ base::Bind(&LoadState, writer_->path()), |
base::Bind(&TransportSecurityPersister::CompleteLoad, |
weak_ptr_factory_.GetWeakPtr())); |
} |
@@ -111,8 +113,8 @@ TransportSecurityPersister::TransportSecurityPersister( |
TransportSecurityPersister::~TransportSecurityPersister() { |
DCHECK(foreground_runner_->RunsTasksOnCurrentThread()); |
- if (writer_.HasPendingWrite()) |
- writer_.DoScheduledWrite(); |
+ if (writer_->HasPendingWrite()) |
+ writer_->DoScheduledWrite(); |
transport_security_state_->SetDelegate(NULL); |
} |
@@ -123,7 +125,7 @@ void TransportSecurityPersister::StateIsDirty( |
DCHECK_EQ(transport_security_state_, state); |
if (!readonly_) |
- writer_.ScheduleWrite(this); |
+ writer_->ScheduleWrite(this); |
} |
bool TransportSecurityPersister::SerializeData(std::string* output) { |