Chromium Code Reviews| Index: chrome/browser/profiles/profile_impl_io_data.cc |
| diff --git a/chrome/browser/profiles/profile_impl_io_data.cc b/chrome/browser/profiles/profile_impl_io_data.cc |
| index 5af118651a2aaa4c21d25a03237586d558a741d4..7c62870f294b7eab417484b1aa7c2954fe24128d 100644 |
| --- a/chrome/browser/profiles/profile_impl_io_data.cc |
| +++ b/chrome/browser/profiles/profile_impl_io_data.cc |
| @@ -9,6 +9,8 @@ |
| #include "base/logging.h" |
| #include "base/memory/scoped_ptr.h" |
| #include "base/metrics/field_trial.h" |
| +#include "base/prefs/json_pref_store.h" |
| +#include "base/prefs/pref_filter.h" |
| #include "base/prefs/pref_member.h" |
| #include "base/prefs/pref_service.h" |
| #include "base/profiler/scoped_tracker.h" |
| @@ -424,6 +426,15 @@ void ProfileImplIOData::InitializeInternal( |
| FROM_HERE_WITH_EXPLICIT_FUNCTION( |
| "436671 ProfileImplIOData::InitializeInternal")); |
| + // Setup a persistent store for use by the network stack on the IO thread. |
|
mmenke
2015/01/30 20:18:40
Setup -> Set up (Setup is a noun, Set up a verb)
Randy Smith (Not in Mondays)
2015/01/31 02:53:29
Done.
|
| + base::FilePath network_json_store_filepath( |
| + profile_path_.Append(chrome::kNetworkPersistentStateFilename)); |
| + network_json_store_ = new JsonPrefStore( |
| + network_json_store_filepath, |
| + JsonPrefStore::GetTaskRunnerForFile(network_json_store_filepath, |
| + BrowserThread::GetBlockingPool()), |
| + scoped_ptr<PrefFilter>()); |
| + |
| net::URLRequestContext* main_context = main_request_context(); |
| IOThread* const io_thread = profile_params->io_thread; |
| @@ -611,6 +622,7 @@ void ProfileImplIOData::InitializeInternal( |
| sdch_manager_.reset(new net::SdchManager); |
| sdch_policy_.reset(new net::SdchOwner(sdch_manager_.get(), main_context)); |
| main_context->set_sdch_manager(sdch_manager_.get()); |
| + sdch_policy_->EnablePersistentStorage(network_json_store_.get()); |
| // Create a media request context based on the main context, but using a |
| // media cache. It shares the same job factory as the main context. |