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 <memory> | 7 #include <memory> |
8 #include <set> | 8 #include <set> |
9 #include <string> | 9 #include <string> |
10 #include <utility> | 10 #include <utility> |
(...skipping 361 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
372 | 372 |
373 void ProfileImplIOData::Handle::LazyInitialize() const { | 373 void ProfileImplIOData::Handle::LazyInitialize() const { |
374 DCHECK_CURRENTLY_ON(BrowserThread::UI); | 374 DCHECK_CURRENTLY_ON(BrowserThread::UI); |
375 if (initialized_) | 375 if (initialized_) |
376 return; | 376 return; |
377 | 377 |
378 // Set initialized_ to true at the beginning in case any of the objects | 378 // Set initialized_ to true at the beginning in case any of the objects |
379 // below try to get the ResourceContext pointer. | 379 // below try to get the ResourceContext pointer. |
380 initialized_ = true; | 380 initialized_ = true; |
381 PrefService* pref_service = profile_->GetPrefs(); | 381 PrefService* pref_service = profile_->GetPrefs(); |
382 io_data_->session_startup_pref()->Init( | |
383 prefs::kRestoreOnStartup, pref_service); | |
384 io_data_->session_startup_pref()->MoveToThread( | |
385 BrowserThread::GetTaskRunnerForThread(BrowserThread::IO)); | |
386 io_data_->safe_browsing_enabled()->Init(prefs::kSafeBrowsingEnabled, | 382 io_data_->safe_browsing_enabled()->Init(prefs::kSafeBrowsingEnabled, |
387 pref_service); | 383 pref_service); |
388 io_data_->safe_browsing_enabled()->MoveToThread( | 384 io_data_->safe_browsing_enabled()->MoveToThread( |
389 BrowserThread::GetTaskRunnerForThread(BrowserThread::IO)); | 385 BrowserThread::GetTaskRunnerForThread(BrowserThread::IO)); |
390 io_data_->InitializeOnUIThread(profile_); | 386 io_data_->InitializeOnUIThread(profile_); |
391 } | 387 } |
392 | 388 |
393 std::unique_ptr<ProfileIOData::ChromeURLRequestContextGetterVector> | 389 std::unique_ptr<ProfileIOData::ChromeURLRequestContextGetterVector> |
394 ProfileImplIOData::Handle::GetAllContextGetters() { | 390 ProfileImplIOData::Handle::GetAllContextGetters() { |
395 ChromeURLRequestContextGetterMap::iterator iter; | 391 ChromeURLRequestContextGetterMap::iterator iter; |
(...skipping 419 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
815 const base::Closure& completion) { | 811 const base::Closure& completion) { |
816 DCHECK_CURRENTLY_ON(BrowserThread::IO); | 812 DCHECK_CURRENTLY_ON(BrowserThread::IO); |
817 DCHECK(initialized()); | 813 DCHECK(initialized()); |
818 | 814 |
819 DCHECK(transport_security_state()); | 815 DCHECK(transport_security_state()); |
820 // Completes synchronously. | 816 // Completes synchronously. |
821 transport_security_state()->DeleteAllDynamicDataSince(time); | 817 transport_security_state()->DeleteAllDynamicDataSince(time); |
822 DCHECK(http_server_properties_manager_); | 818 DCHECK(http_server_properties_manager_); |
823 http_server_properties_manager_->Clear(completion); | 819 http_server_properties_manager_->Clear(completion); |
824 } | 820 } |
OLD | NEW |