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

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

Issue 11186002: Add a SafeSearch preference, policy and implementation. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Minor last changes. Merged with the latest version from the tree. Created 8 years, 1 month 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 179 matching lines...) Expand 10 before | Expand all | Expand 10 after
190 ProxyServiceFactory::CreateProxyConfigService(true); 190 ProxyServiceFactory::CreateProxyConfigService(true);
191 params->proxy_config_service.reset(proxy_config_service); 191 params->proxy_config_service.reset(proxy_config_service);
192 profile->GetProxyConfigTracker()->SetChromeProxyConfigService( 192 profile->GetProxyConfigTracker()->SetChromeProxyConfigService(
193 proxy_config_service); 193 proxy_config_service);
194 params->profile = profile; 194 params->profile = profile;
195 profile_params_.reset(params.release()); 195 profile_params_.reset(params.release());
196 196
197 ChromeNetworkDelegate::InitializePrefsOnUIThread( 197 ChromeNetworkDelegate::InitializePrefsOnUIThread(
198 &enable_referrers_, 198 &enable_referrers_,
199 &enable_do_not_track_, 199 &enable_do_not_track_,
200 &force_safesearch_,
200 pref_service); 201 pref_service);
201 202
202 #if defined(ENABLE_PRINTING) 203 #if defined(ENABLE_PRINTING)
203 printing_enabled_.Init(prefs::kPrintingEnabled, pref_service, NULL); 204 printing_enabled_.Init(prefs::kPrintingEnabled, pref_service, NULL);
204 printing_enabled_.MoveToThread( 205 printing_enabled_.MoveToThread(
205 BrowserThread::GetMessageLoopProxyForThread(BrowserThread::IO)); 206 BrowserThread::GetMessageLoopProxyForThread(BrowserThread::IO));
206 #endif 207 #endif
207 208
208 // The URLBlacklistManager has to be created on the UI thread to register 209 // The URLBlacklistManager has to be created on the UI thread to register
209 // observers of |pref_service|, and it also has to clean up on 210 // observers of |pref_service|, and it also has to clean up on
(...skipping 320 matching lines...) Expand 10 before | Expand all | Expand 10 after
530 url_blacklist_manager_.get(), 531 url_blacklist_manager_.get(),
531 #if !defined(OS_ANDROID) 532 #if !defined(OS_ANDROID)
532 ManagedMode::GetURLFilter(), 533 ManagedMode::GetURLFilter(),
533 #else 534 #else
534 NULL, 535 NULL,
535 #endif 536 #endif
536 profile_params_->profile, 537 profile_params_->profile,
537 profile_params_->cookie_settings, 538 profile_params_->cookie_settings,
538 &enable_referrers_, 539 &enable_referrers_,
539 &enable_do_not_track_, 540 &enable_do_not_track_,
541 &force_safesearch_,
540 load_time_stats_)); 542 load_time_stats_));
541 543
542 fraudulent_certificate_reporter_.reset( 544 fraudulent_certificate_reporter_.reset(
543 new chrome_browser_net::ChromeFraudulentCertificateReporter( 545 new chrome_browser_net::ChromeFraudulentCertificateReporter(
544 main_request_context_.get())); 546 main_request_context_.get()));
545 547
546 proxy_service_.reset( 548 proxy_service_.reset(
547 ProxyServiceFactory::CreateProxyService( 549 ProxyServiceFactory::CreateProxyService(
548 io_thread->net_log(), 550 io_thread->net_log(),
549 io_thread_globals->proxy_script_fetcher_context.get(), 551 io_thread_globals->proxy_script_fetcher_context.get(),
(...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after
651 chrome::kFtpScheme, 653 chrome::kFtpScheme,
652 new net::FtpProtocolHandler(ftp_transaction_factory, 654 new net::FtpProtocolHandler(ftp_transaction_factory,
653 ftp_auth_cache)); 655 ftp_auth_cache));
654 #endif // !defined(DISABLE_FTP_SUPPORT) 656 #endif // !defined(DISABLE_FTP_SUPPORT)
655 } 657 }
656 658
657 void ProfileIOData::ShutdownOnUIThread() { 659 void ProfileIOData::ShutdownOnUIThread() {
658 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); 660 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
659 enable_referrers_.Destroy(); 661 enable_referrers_.Destroy();
660 enable_do_not_track_.Destroy(); 662 enable_do_not_track_.Destroy();
663 force_safesearch_.Destroy();
661 #if !defined(OS_CHROMEOS) 664 #if !defined(OS_CHROMEOS)
662 enable_metrics_.Destroy(); 665 enable_metrics_.Destroy();
663 #endif 666 #endif
664 safe_browsing_enabled_.Destroy(); 667 safe_browsing_enabled_.Destroy();
665 printing_enabled_.Destroy(); 668 printing_enabled_.Destroy();
666 session_startup_pref_.Destroy(); 669 session_startup_pref_.Destroy();
667 #if defined(ENABLE_CONFIGURATION_POLICY) 670 #if defined(ENABLE_CONFIGURATION_POLICY)
668 if (url_blacklist_manager_.get()) 671 if (url_blacklist_manager_.get())
669 url_blacklist_manager_->ShutdownOnUIThread(); 672 url_blacklist_manager_->ShutdownOnUIThread();
670 #endif 673 #endif
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
707 params->http_pipelining_enabled = globals->http_pipelining_enabled; 710 params->http_pipelining_enabled = globals->http_pipelining_enabled;
708 params->testing_fixed_http_port = globals->testing_fixed_http_port; 711 params->testing_fixed_http_port = globals->testing_fixed_http_port;
709 params->testing_fixed_https_port = globals->testing_fixed_https_port; 712 params->testing_fixed_https_port = globals->testing_fixed_https_port;
710 713
711 const CommandLine& command_line = *CommandLine::ForCurrentProcess(); 714 const CommandLine& command_line = *CommandLine::ForCurrentProcess();
712 if (command_line.HasSwitch(switches::kTrustedSpdyProxy)) { 715 if (command_line.HasSwitch(switches::kTrustedSpdyProxy)) {
713 params->trusted_spdy_proxy = command_line.GetSwitchValueASCII( 716 params->trusted_spdy_proxy = command_line.GetSwitchValueASCII(
714 switches::kTrustedSpdyProxy); 717 switches::kTrustedSpdyProxy);
715 } 718 }
716 } 719 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698