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

Side by Side Diff: chrome/browser/profiles/profile_impl_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_impl_io_data.h" 5 #include "chrome/browser/profiles/profile_impl_io_data.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/command_line.h" 8 #include "base/command_line.h"
9 #include "base/file_util.h" 9 #include "base/file_util.h"
10 #include "base/logging.h" 10 #include "base/logging.h"
11 #include "base/stl_util.h" 11 #include "base/stl_util.h"
12 #include "base/threading/worker_pool.h" 12 #include "base/threading/worker_pool.h"
13 #include "chrome/browser/api/prefs/pref_member.h" 13 #include "chrome/browser/api/prefs/pref_member.h"
14 #include "chrome/browser/io_thread.h" 14 #include "chrome/browser/io_thread.h"
15 #include "chrome/browser/net/about_protocol_handler.h" 15 #include "chrome/browser/net/about_protocol_handler.h"
16 #include "chrome/browser/net/chrome_net_log.h" 16 #include "chrome/browser/net/chrome_net_log.h"
17 #include "chrome/browser/net/chrome_network_delegate.h"
18 #include "chrome/browser/net/clear_on_exit_policy.h" 17 #include "chrome/browser/net/clear_on_exit_policy.h"
19 #include "chrome/browser/net/connect_interceptor.h" 18 #include "chrome/browser/net/connect_interceptor.h"
20 #include "chrome/browser/net/http_server_properties_manager.h" 19 #include "chrome/browser/net/http_server_properties_manager.h"
21 #include "chrome/browser/net/predictor.h" 20 #include "chrome/browser/net/predictor.h"
22 #include "chrome/browser/net/sqlite_persistent_cookie_store.h" 21 #include "chrome/browser/net/sqlite_persistent_cookie_store.h"
23 #include "chrome/browser/net/sqlite_server_bound_cert_store.h" 22 #include "chrome/browser/net/sqlite_server_bound_cert_store.h"
24 #include "chrome/browser/prefs/pref_service.h" 23 #include "chrome/browser/prefs/pref_service.h"
25 #include "chrome/browser/profiles/profile.h" 24 #include "chrome/browser/profiles/profile.h"
26 #include "chrome/browser/ui/webui/chrome_url_data_manager_backend.h" 25 #include "chrome/browser/ui/webui/chrome_url_data_manager_backend.h"
27 #include "chrome/common/chrome_constants.h" 26 #include "chrome/common/chrome_constants.h"
(...skipping 238 matching lines...) Expand 10 before | Expand all | Expand 10 after
266 void ProfileImplIOData::Handle::LazyInitialize() const { 265 void ProfileImplIOData::Handle::LazyInitialize() const {
267 if (initialized_) 266 if (initialized_)
268 return; 267 return;
269 268
270 // Set initialized_ to true at the beginning in case any of the objects 269 // Set initialized_ to true at the beginning in case any of the objects
271 // below try to get the ResourceContext pointer. 270 // below try to get the ResourceContext pointer.
272 initialized_ = true; 271 initialized_ = true;
273 PrefService* pref_service = profile_->GetPrefs(); 272 PrefService* pref_service = profile_->GetPrefs();
274 io_data_->set_http_server_properties_manager( 273 io_data_->set_http_server_properties_manager(
275 new chrome_browser_net::HttpServerPropertiesManager(pref_service)); 274 new chrome_browser_net::HttpServerPropertiesManager(pref_service));
276 ChromeNetworkDelegate::InitializeReferrersEnabled(
277 io_data_->enable_referrers(), pref_service);
278 io_data_->session_startup_pref()->Init( 275 io_data_->session_startup_pref()->Init(
279 prefs::kRestoreOnStartup, pref_service, NULL); 276 prefs::kRestoreOnStartup, pref_service, NULL);
280 io_data_->session_startup_pref()->MoveToThread(BrowserThread::IO); 277 io_data_->session_startup_pref()->MoveToThread(BrowserThread::IO);
281 #if defined(ENABLE_SAFE_BROWSING) 278 #if defined(ENABLE_SAFE_BROWSING)
282 io_data_->safe_browsing_enabled()->Init(prefs::kSafeBrowsingEnabled, 279 io_data_->safe_browsing_enabled()->Init(prefs::kSafeBrowsingEnabled,
283 pref_service, NULL); 280 pref_service, NULL);
284 io_data_->safe_browsing_enabled()->MoveToThread(BrowserThread::IO); 281 io_data_->safe_browsing_enabled()->MoveToThread(BrowserThread::IO);
285 #endif 282 #endif
286 io_data_->InitializeOnUIThread(profile_); 283 io_data_->InitializeOnUIThread(profile_);
287 } 284 }
(...skipping 374 matching lines...) Expand 10 before | Expand all | Expand 10 after
662 void ProfileImplIOData::ClearNetworkingHistorySinceOnIOThread( 659 void ProfileImplIOData::ClearNetworkingHistorySinceOnIOThread(
663 base::Time time) { 660 base::Time time) {
664 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO)); 661 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO));
665 LazyInitialize(); 662 LazyInitialize();
666 663
667 DCHECK(transport_security_state()); 664 DCHECK(transport_security_state());
668 transport_security_state()->DeleteSince(time); 665 transport_security_state()->DeleteSince(time);
669 DCHECK(http_server_properties_manager()); 666 DCHECK(http_server_properties_manager());
670 http_server_properties_manager()->Clear(); 667 http_server_properties_manager()->Clear();
671 } 668 }
OLDNEW
« no previous file with comments | « chrome/browser/profiles/off_the_record_profile_io_data.cc ('k') | chrome/browser/profiles/profile_io_data.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698