| 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_io_data.h" | 5 #include "chrome/browser/profiles/profile_io_data.h" |
| 6 | 6 |
| 7 #include <string> | 7 #include <string> |
| 8 | 8 |
| 9 #include "base/basictypes.h" | 9 #include "base/basictypes.h" |
| 10 #include "base/bind.h" | 10 #include "base/bind.h" |
| (...skipping 301 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 312 reverse_autologin_enabled_.Init( | 312 reverse_autologin_enabled_.Init( |
| 313 prefs::kReverseAutologinEnabled, pref_service); | 313 prefs::kReverseAutologinEnabled, pref_service); |
| 314 reverse_autologin_enabled_.MoveToThread(io_message_loop_proxy); | 314 reverse_autologin_enabled_.MoveToThread(io_message_loop_proxy); |
| 315 | 315 |
| 316 one_click_signin_rejected_email_list_.Init( | 316 one_click_signin_rejected_email_list_.Init( |
| 317 prefs::kReverseAutologinRejectedEmailList, pref_service); | 317 prefs::kReverseAutologinRejectedEmailList, pref_service); |
| 318 one_click_signin_rejected_email_list_.MoveToThread(io_message_loop_proxy); | 318 one_click_signin_rejected_email_list_.MoveToThread(io_message_loop_proxy); |
| 319 | 319 |
| 320 sync_disabled_.Init(prefs::kSyncManaged, pref_service); | 320 sync_disabled_.Init(prefs::kSyncManaged, pref_service); |
| 321 sync_disabled_.MoveToThread(io_message_loop_proxy); | 321 sync_disabled_.MoveToThread(io_message_loop_proxy); |
| 322 |
| 323 signin_allowed_.Init(prefs::kSigninAllowed, pref_service); |
| 324 signin_allowed_.MoveToThread(io_message_loop_proxy); |
| 322 } | 325 } |
| 323 | 326 |
| 324 // The URLBlacklistManager has to be created on the UI thread to register | 327 // The URLBlacklistManager has to be created on the UI thread to register |
| 325 // observers of |pref_service|, and it also has to clean up on | 328 // observers of |pref_service|, and it also has to clean up on |
| 326 // ShutdownOnUIThread to release these observers on the right thread. | 329 // ShutdownOnUIThread to release these observers on the right thread. |
| 327 // Don't pass it in |profile_params_| to make sure it is correctly cleaned up, | 330 // Don't pass it in |profile_params_| to make sure it is correctly cleaned up, |
| 328 // in particular when this ProfileIOData isn't |initialized_| during deletion. | 331 // in particular when this ProfileIOData isn't |initialized_| during deletion. |
| 329 #if defined(ENABLE_CONFIGURATION_POLICY) | 332 #if defined(ENABLE_CONFIGURATION_POLICY) |
| 330 url_blacklist_manager_.reset(new policy::URLBlacklistManager(pref_service)); | 333 url_blacklist_manager_.reset(new policy::URLBlacklistManager(pref_service)); |
| 331 #endif | 334 #endif |
| (...skipping 435 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 767 one_click_signin_rejected_email_list_.Destroy(); | 770 one_click_signin_rejected_email_list_.Destroy(); |
| 768 enable_referrers_.Destroy(); | 771 enable_referrers_.Destroy(); |
| 769 enable_do_not_track_.Destroy(); | 772 enable_do_not_track_.Destroy(); |
| 770 force_safesearch_.Destroy(); | 773 force_safesearch_.Destroy(); |
| 771 #if !defined(OS_CHROMEOS) | 774 #if !defined(OS_CHROMEOS) |
| 772 enable_metrics_.Destroy(); | 775 enable_metrics_.Destroy(); |
| 773 #endif | 776 #endif |
| 774 safe_browsing_enabled_.Destroy(); | 777 safe_browsing_enabled_.Destroy(); |
| 775 printing_enabled_.Destroy(); | 778 printing_enabled_.Destroy(); |
| 776 sync_disabled_.Destroy(); | 779 sync_disabled_.Destroy(); |
| 780 signin_allowed_.Destroy(); |
| 777 session_startup_pref_.Destroy(); | 781 session_startup_pref_.Destroy(); |
| 778 #if defined(ENABLE_CONFIGURATION_POLICY) | 782 #if defined(ENABLE_CONFIGURATION_POLICY) |
| 779 if (url_blacklist_manager_.get()) | 783 if (url_blacklist_manager_.get()) |
| 780 url_blacklist_manager_->ShutdownOnUIThread(); | 784 url_blacklist_manager_->ShutdownOnUIThread(); |
| 781 #endif | 785 #endif |
| 782 if (chrome_http_user_agent_settings_.get()) | 786 if (chrome_http_user_agent_settings_.get()) |
| 783 chrome_http_user_agent_settings_->CleanupOnUIThread(); | 787 chrome_http_user_agent_settings_->CleanupOnUIThread(); |
| 784 bool posted = BrowserThread::DeleteSoon(BrowserThread::IO, FROM_HERE, this); | 788 bool posted = BrowserThread::DeleteSoon(BrowserThread::IO, FROM_HERE, this); |
| 785 if (!posted) | 789 if (!posted) |
| 786 delete this; | 790 delete this; |
| (...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 821 void ProfileIOData::SetCookieSettingsForTesting( | 825 void ProfileIOData::SetCookieSettingsForTesting( |
| 822 CookieSettings* cookie_settings) { | 826 CookieSettings* cookie_settings) { |
| 823 DCHECK(!cookie_settings_.get()); | 827 DCHECK(!cookie_settings_.get()); |
| 824 cookie_settings_ = cookie_settings; | 828 cookie_settings_ = cookie_settings; |
| 825 } | 829 } |
| 826 | 830 |
| 827 void ProfileIOData::set_signin_names_for_testing( | 831 void ProfileIOData::set_signin_names_for_testing( |
| 828 SigninNamesOnIOThread* signin_names) { | 832 SigninNamesOnIOThread* signin_names) { |
| 829 signin_names_.reset(signin_names); | 833 signin_names_.reset(signin_names); |
| 830 } | 834 } |
| OLD | NEW |