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

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

Issue 10911283: Implement 'Do Not Track' header (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Merged with ToT Created 8 years, 3 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 185 matching lines...) Expand 10 before | Expand all | Expand 10 after
196 params->protocol_handler_url_interceptor.reset( 196 params->protocol_handler_url_interceptor.reset(
197 protocol_handler_registry->CreateURLInterceptor()); 197 protocol_handler_registry->CreateURLInterceptor());
198 198
199 ChromeProxyConfigService* proxy_config_service = 199 ChromeProxyConfigService* proxy_config_service =
200 ProxyServiceFactory::CreateProxyConfigService(true); 200 ProxyServiceFactory::CreateProxyConfigService(true);
201 params->proxy_config_service.reset(proxy_config_service); 201 params->proxy_config_service.reset(proxy_config_service);
202 profile->GetProxyConfigTracker()->SetChromeProxyConfigService( 202 profile->GetProxyConfigTracker()->SetChromeProxyConfigService(
203 proxy_config_service); 203 proxy_config_service);
204 params->profile = profile; 204 params->profile = profile;
205 profile_params_.reset(params.release()); 205 profile_params_.reset(params.release());
206
207 ChromeNetworkDelegate::InitializePrefsOnUIThread(
208 &enable_referrers_,
209 &enable_do_not_track_,
210 pref_service);
211
206 #if defined(ENABLE_PRINTING) 212 #if defined(ENABLE_PRINTING)
207 printing_enabled_.Init(prefs::kPrintingEnabled, pref_service, NULL); 213 printing_enabled_.Init(prefs::kPrintingEnabled, pref_service, NULL);
208 printing_enabled_.MoveToThread(BrowserThread::IO); 214 printing_enabled_.MoveToThread(BrowserThread::IO);
209 #endif 215 #endif
210 216
211 // The URLBlacklistManager has to be created on the UI thread to register 217 // The URLBlacklistManager has to be created on the UI thread to register
212 // observers of |pref_service|, and it also has to clean up on 218 // observers of |pref_service|, and it also has to clean up on
213 // ShutdownOnUIThread to release these observers on the right thread. 219 // ShutdownOnUIThread to release these observers on the right thread.
214 // Don't pass it in |profile_params_| to make sure it is correctly cleaned up, 220 // Don't pass it in |profile_params_| to make sure it is correctly cleaned up,
215 // in particular when this ProfileIOData isn't |initialized_| during deletion. 221 // in particular when this ProfileIOData isn't |initialized_| during deletion.
(...skipping 308 matching lines...) Expand 10 before | Expand all | Expand 10 after
524 profile_params_->extension_info_map, 530 profile_params_->extension_info_map,
525 url_blacklist_manager_.get(), 531 url_blacklist_manager_.get(),
526 #if !defined(OS_ANDROID) 532 #if !defined(OS_ANDROID)
527 ManagedMode::GetURLFilter(), 533 ManagedMode::GetURLFilter(),
528 #else 534 #else
529 NULL, 535 NULL,
530 #endif 536 #endif
531 profile_params_->profile, 537 profile_params_->profile,
532 profile_params_->cookie_settings, 538 profile_params_->cookie_settings,
533 &enable_referrers_, 539 &enable_referrers_,
540 &enable_do_not_track_,
534 load_time_stats_)); 541 load_time_stats_));
535 542
536 fraudulent_certificate_reporter_.reset( 543 fraudulent_certificate_reporter_.reset(
537 new chrome_browser_net::ChromeFraudulentCertificateReporter( 544 new chrome_browser_net::ChromeFraudulentCertificateReporter(
538 main_request_context_.get())); 545 main_request_context_.get()));
539 546
540 proxy_service_.reset( 547 proxy_service_.reset(
541 ProxyServiceFactory::CreateProxyService( 548 ProxyServiceFactory::CreateProxyService(
542 io_thread->net_log(), 549 io_thread->net_log(),
543 io_thread_globals->proxy_script_fetcher_context.get(), 550 io_thread_globals->proxy_script_fetcher_context.get(),
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after
622 const CommandLine& parsed_command_line = *CommandLine::ForCurrentProcess(); 629 const CommandLine& parsed_command_line = *CommandLine::ForCurrentProcess();
623 if (parsed_command_line.HasSwitch(switches::kEnableGView)) 630 if (parsed_command_line.HasSwitch(switches::kEnableGView))
624 job_factory->AddInterceptor(new chromeos::GViewRequestInterceptor); 631 job_factory->AddInterceptor(new chromeos::GViewRequestInterceptor);
625 #endif // !defined(GOOGLE_CHROME_BUILD) 632 #endif // !defined(GOOGLE_CHROME_BUILD)
626 #endif // defined(OS_CHROMEOS) 633 #endif // defined(OS_CHROMEOS)
627 } 634 }
628 635
629 void ProfileIOData::ShutdownOnUIThread() { 636 void ProfileIOData::ShutdownOnUIThread() {
630 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); 637 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
631 enable_referrers_.Destroy(); 638 enable_referrers_.Destroy();
639 enable_do_not_track_.Destroy();
632 #if !defined(OS_CHROMEOS) 640 #if !defined(OS_CHROMEOS)
633 enable_metrics_.Destroy(); 641 enable_metrics_.Destroy();
634 #endif 642 #endif
635 safe_browsing_enabled_.Destroy(); 643 safe_browsing_enabled_.Destroy();
636 printing_enabled_.Destroy(); 644 printing_enabled_.Destroy();
637 session_startup_pref_.Destroy(); 645 session_startup_pref_.Destroy();
638 #if defined(ENABLE_CONFIGURATION_POLICY) 646 #if defined(ENABLE_CONFIGURATION_POLICY)
639 if (url_blacklist_manager_.get()) 647 if (url_blacklist_manager_.get())
640 url_blacklist_manager_->ShutdownOnUIThread(); 648 url_blacklist_manager_->ShutdownOnUIThread();
641 #endif 649 #endif
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
678 params->http_pipelining_enabled = globals->http_pipelining_enabled; 686 params->http_pipelining_enabled = globals->http_pipelining_enabled;
679 params->testing_fixed_http_port = globals->testing_fixed_http_port; 687 params->testing_fixed_http_port = globals->testing_fixed_http_port;
680 params->testing_fixed_https_port = globals->testing_fixed_https_port; 688 params->testing_fixed_https_port = globals->testing_fixed_https_port;
681 689
682 const CommandLine& command_line = *CommandLine::ForCurrentProcess(); 690 const CommandLine& command_line = *CommandLine::ForCurrentProcess();
683 if (command_line.HasSwitch(switches::kTrustedSpdyProxy)) { 691 if (command_line.HasSwitch(switches::kTrustedSpdyProxy)) {
684 params->trusted_spdy_proxy = command_line.GetSwitchValueASCII( 692 params->trusted_spdy_proxy = command_line.GetSwitchValueASCII(
685 switches::kTrustedSpdyProxy); 693 switches::kTrustedSpdyProxy);
686 } 694 }
687 } 695 }
OLDNEW
« no previous file with comments | « chrome/browser/profiles/profile_io_data.h ('k') | chrome/browser/resources/options/browser_options.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698