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/profiles/profile_impl_io_data.h" | 5 #include "chrome/browser/profiles/profile_impl_io_data.h" |
6 | 6 |
7 #include <set> | 7 #include <set> |
8 | 8 |
9 #include "base/bind.h" | 9 #include "base/bind.h" |
10 #include "base/command_line.h" | 10 #include "base/command_line.h" |
(...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
125 save_prefs = !chromeos::ProfileHelper::IsSigninProfile(profile_); | 125 save_prefs = !chromeos::ProfileHelper::IsSigninProfile(profile_); |
126 #endif | 126 #endif |
127 if (save_prefs) | 127 if (save_prefs) |
128 io_data_->predictor_->SaveStateForNextStartupAndTrim(); | 128 io_data_->predictor_->SaveStateForNextStartupAndTrim(); |
129 io_data_->predictor_->ShutdownOnUIThread(); | 129 io_data_->predictor_->ShutdownOnUIThread(); |
130 } | 130 } |
131 | 131 |
132 if (io_data_->http_server_properties_manager_) | 132 if (io_data_->http_server_properties_manager_) |
133 io_data_->http_server_properties_manager_->ShutdownOnPrefThread(); | 133 io_data_->http_server_properties_manager_->ShutdownOnPrefThread(); |
134 | 134 |
135 io_data_->data_reduction_proxy_io_data()->ShutdownOnUIThread(); | 135 // io_data_->data_reduction_proxy_io_data() might be NULL if Init() was |
| 136 // never called. |
| 137 if (io_data_->data_reduction_proxy_io_data()) |
| 138 io_data_->data_reduction_proxy_io_data()->ShutdownOnUIThread(); |
| 139 |
136 io_data_->ShutdownOnUIThread(GetAllContextGetters().Pass()); | 140 io_data_->ShutdownOnUIThread(GetAllContextGetters().Pass()); |
137 } | 141 } |
138 | 142 |
139 void ProfileImplIOData::Handle::Init( | 143 void ProfileImplIOData::Handle::Init( |
140 const base::FilePath& cookie_path, | 144 const base::FilePath& cookie_path, |
141 const base::FilePath& channel_id_path, | 145 const base::FilePath& channel_id_path, |
142 const base::FilePath& cache_path, | 146 const base::FilePath& cache_path, |
143 int cache_max_size, | 147 int cache_max_size, |
144 const base::FilePath& media_cache_path, | 148 const base::FilePath& media_cache_path, |
145 int media_cache_max_size, | 149 int media_cache_max_size, |
(...skipping 699 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
845 const base::Closure& completion) { | 849 const base::Closure& completion) { |
846 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO)); | 850 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO)); |
847 DCHECK(initialized()); | 851 DCHECK(initialized()); |
848 | 852 |
849 DCHECK(transport_security_state()); | 853 DCHECK(transport_security_state()); |
850 // Completes synchronously. | 854 // Completes synchronously. |
851 transport_security_state()->DeleteAllDynamicDataSince(time); | 855 transport_security_state()->DeleteAllDynamicDataSince(time); |
852 DCHECK(http_server_properties_manager_); | 856 DCHECK(http_server_properties_manager_); |
853 http_server_properties_manager_->Clear(completion); | 857 http_server_properties_manager_->Clear(completion); |
854 } | 858 } |
OLD | NEW |