Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(336)

Side by Side Diff: chrome/browser/profiles/profile_io_data.cc

Issue 12088040: Add a SigninAllowed policy. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix indentation issues. Created 7 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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
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 462 matching lines...) Expand 10 before | Expand all | Expand 10 after
780 one_click_signin_rejected_email_list_.Destroy(); 783 one_click_signin_rejected_email_list_.Destroy();
781 enable_referrers_.Destroy(); 784 enable_referrers_.Destroy();
782 enable_do_not_track_.Destroy(); 785 enable_do_not_track_.Destroy();
783 force_safesearch_.Destroy(); 786 force_safesearch_.Destroy();
784 #if !defined(OS_CHROMEOS) 787 #if !defined(OS_CHROMEOS)
785 enable_metrics_.Destroy(); 788 enable_metrics_.Destroy();
786 #endif 789 #endif
787 safe_browsing_enabled_.Destroy(); 790 safe_browsing_enabled_.Destroy();
788 printing_enabled_.Destroy(); 791 printing_enabled_.Destroy();
789 sync_disabled_.Destroy(); 792 sync_disabled_.Destroy();
793 signin_allowed_.Destroy();
790 session_startup_pref_.Destroy(); 794 session_startup_pref_.Destroy();
791 #if defined(ENABLE_CONFIGURATION_POLICY) 795 #if defined(ENABLE_CONFIGURATION_POLICY)
792 if (url_blacklist_manager_.get()) 796 if (url_blacklist_manager_.get())
793 url_blacklist_manager_->ShutdownOnUIThread(); 797 url_blacklist_manager_->ShutdownOnUIThread();
794 #endif 798 #endif
795 if (chrome_http_user_agent_settings_.get()) 799 if (chrome_http_user_agent_settings_.get())
796 chrome_http_user_agent_settings_->CleanupOnUIThread(); 800 chrome_http_user_agent_settings_->CleanupOnUIThread();
797 bool posted = BrowserThread::DeleteSoon(BrowserThread::IO, FROM_HERE, this); 801 bool posted = BrowserThread::DeleteSoon(BrowserThread::IO, FROM_HERE, this);
798 if (!posted) 802 if (!posted)
799 delete this; 803 delete this;
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
834 void ProfileIOData::SetCookieSettingsForTesting( 838 void ProfileIOData::SetCookieSettingsForTesting(
835 CookieSettings* cookie_settings) { 839 CookieSettings* cookie_settings) {
836 DCHECK(!cookie_settings_.get()); 840 DCHECK(!cookie_settings_.get());
837 cookie_settings_ = cookie_settings; 841 cookie_settings_ = cookie_settings;
838 } 842 }
839 843
840 void ProfileIOData::set_signin_names_for_testing( 844 void ProfileIOData::set_signin_names_for_testing(
841 SigninNamesOnIOThread* signin_names) { 845 SigninNamesOnIOThread* signin_names) {
842 signin_names_.reset(signin_names); 846 signin_names_.reset(signin_names);
843 } 847 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698