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 287 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
298 reverse_autologin_enabled_.Init( | 298 reverse_autologin_enabled_.Init( |
299 prefs::kReverseAutologinEnabled, pref_service); | 299 prefs::kReverseAutologinEnabled, pref_service); |
300 reverse_autologin_enabled_.MoveToThread(io_message_loop_proxy); | 300 reverse_autologin_enabled_.MoveToThread(io_message_loop_proxy); |
301 | 301 |
302 one_click_signin_rejected_email_list_.Init( | 302 one_click_signin_rejected_email_list_.Init( |
303 prefs::kReverseAutologinRejectedEmailList, pref_service); | 303 prefs::kReverseAutologinRejectedEmailList, pref_service); |
304 one_click_signin_rejected_email_list_.MoveToThread(io_message_loop_proxy); | 304 one_click_signin_rejected_email_list_.MoveToThread(io_message_loop_proxy); |
305 | 305 |
306 sync_disabled_.Init(prefs::kSyncManaged, pref_service); | 306 sync_disabled_.Init(prefs::kSyncManaged, pref_service); |
307 sync_disabled_.MoveToThread(io_message_loop_proxy); | 307 sync_disabled_.MoveToThread(io_message_loop_proxy); |
| 308 |
| 309 signin_allowed_.Init(prefs::kSigninAllowed, pref_service); |
| 310 signin_allowed_.MoveToThread(io_message_loop_proxy); |
308 } | 311 } |
309 | 312 |
310 // The URLBlacklistManager has to be created on the UI thread to register | 313 // The URLBlacklistManager has to be created on the UI thread to register |
311 // observers of |pref_service|, and it also has to clean up on | 314 // observers of |pref_service|, and it also has to clean up on |
312 // ShutdownOnUIThread to release these observers on the right thread. | 315 // ShutdownOnUIThread to release these observers on the right thread. |
313 // Don't pass it in |profile_params_| to make sure it is correctly cleaned up, | 316 // Don't pass it in |profile_params_| to make sure it is correctly cleaned up, |
314 // in particular when this ProfileIOData isn't |initialized_| during deletion. | 317 // in particular when this ProfileIOData isn't |initialized_| during deletion. |
315 #if defined(ENABLE_CONFIGURATION_POLICY) | 318 #if defined(ENABLE_CONFIGURATION_POLICY) |
316 url_blacklist_manager_.reset(new policy::URLBlacklistManager(pref_service)); | 319 url_blacklist_manager_.reset(new policy::URLBlacklistManager(pref_service)); |
317 #endif | 320 #endif |
(...skipping 466 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
784 one_click_signin_rejected_email_list_.Destroy(); | 787 one_click_signin_rejected_email_list_.Destroy(); |
785 enable_referrers_.Destroy(); | 788 enable_referrers_.Destroy(); |
786 enable_do_not_track_.Destroy(); | 789 enable_do_not_track_.Destroy(); |
787 force_safesearch_.Destroy(); | 790 force_safesearch_.Destroy(); |
788 #if !defined(OS_CHROMEOS) | 791 #if !defined(OS_CHROMEOS) |
789 enable_metrics_.Destroy(); | 792 enable_metrics_.Destroy(); |
790 #endif | 793 #endif |
791 safe_browsing_enabled_.Destroy(); | 794 safe_browsing_enabled_.Destroy(); |
792 printing_enabled_.Destroy(); | 795 printing_enabled_.Destroy(); |
793 sync_disabled_.Destroy(); | 796 sync_disabled_.Destroy(); |
| 797 signin_allowed_.Destroy(); |
794 session_startup_pref_.Destroy(); | 798 session_startup_pref_.Destroy(); |
795 #if defined(ENABLE_CONFIGURATION_POLICY) | 799 #if defined(ENABLE_CONFIGURATION_POLICY) |
796 if (url_blacklist_manager_.get()) | 800 if (url_blacklist_manager_.get()) |
797 url_blacklist_manager_->ShutdownOnUIThread(); | 801 url_blacklist_manager_->ShutdownOnUIThread(); |
798 #endif | 802 #endif |
799 if (chrome_http_user_agent_settings_.get()) | 803 if (chrome_http_user_agent_settings_.get()) |
800 chrome_http_user_agent_settings_->CleanupOnUIThread(); | 804 chrome_http_user_agent_settings_->CleanupOnUIThread(); |
801 bool posted = BrowserThread::DeleteSoon(BrowserThread::IO, FROM_HERE, this); | 805 bool posted = BrowserThread::DeleteSoon(BrowserThread::IO, FROM_HERE, this); |
802 if (!posted) | 806 if (!posted) |
803 delete this; | 807 delete this; |
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
838 void ProfileIOData::SetCookieSettingsForTesting( | 842 void ProfileIOData::SetCookieSettingsForTesting( |
839 CookieSettings* cookie_settings) { | 843 CookieSettings* cookie_settings) { |
840 DCHECK(!cookie_settings_.get()); | 844 DCHECK(!cookie_settings_.get()); |
841 cookie_settings_ = cookie_settings; | 845 cookie_settings_ = cookie_settings; |
842 } | 846 } |
843 | 847 |
844 void ProfileIOData::set_signin_names_for_testing( | 848 void ProfileIOData::set_signin_names_for_testing( |
845 SigninNamesOnIOThread* signin_names) { | 849 SigninNamesOnIOThread* signin_names) { |
846 signin_names_.reset(signin_names); | 850 signin_names_.reset(signin_names); |
847 } | 851 } |
OLD | NEW |