| 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 659 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 805 const base::Closure& completion) { | 809 const base::Closure& completion) { |
| 806 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO)); | 810 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO)); |
| 807 DCHECK(initialized()); | 811 DCHECK(initialized()); |
| 808 | 812 |
| 809 DCHECK(transport_security_state()); | 813 DCHECK(transport_security_state()); |
| 810 // Completes synchronously. | 814 // Completes synchronously. |
| 811 transport_security_state()->DeleteAllDynamicDataSince(time); | 815 transport_security_state()->DeleteAllDynamicDataSince(time); |
| 812 DCHECK(http_server_properties_manager_); | 816 DCHECK(http_server_properties_manager_); |
| 813 http_server_properties_manager_->Clear(completion); | 817 http_server_properties_manager_->Clear(completion); |
| 814 } | 818 } |
| OLD | NEW |