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

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

Issue 615313006: Domain Reliability: Get correct reporting pref once, on startup (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: resolve conflict Created 6 years, 2 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
« no previous file with comments | « chrome/browser/profiles/profile_impl.cc ('k') | components/domain_reliability/monitor.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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/logging.h" 9 #include "base/logging.h"
10 #include "base/metrics/field_trial.h" 10 #include "base/metrics/field_trial.h"
(...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after
107 save_prefs = !chromeos::ProfileHelper::IsSigninProfile(profile_); 107 save_prefs = !chromeos::ProfileHelper::IsSigninProfile(profile_);
108 #endif 108 #endif
109 if (save_prefs) 109 if (save_prefs)
110 io_data_->predictor_->SaveStateForNextStartupAndTrim(); 110 io_data_->predictor_->SaveStateForNextStartupAndTrim();
111 io_data_->predictor_->ShutdownOnUIThread(); 111 io_data_->predictor_->ShutdownOnUIThread();
112 } 112 }
113 113
114 if (io_data_->http_server_properties_manager_) 114 if (io_data_->http_server_properties_manager_)
115 io_data_->http_server_properties_manager_->ShutdownOnPrefThread(); 115 io_data_->http_server_properties_manager_->ShutdownOnPrefThread();
116 116
117 if (io_data_->domain_reliability_monitor_)
118 io_data_->domain_reliability_monitor_->DestroyReportingPref();
119
120 io_data_->ShutdownOnUIThread(GetAllContextGetters().Pass()); 117 io_data_->ShutdownOnUIThread(GetAllContextGetters().Pass());
121 } 118 }
122 119
123 void ProfileImplIOData::Handle::Init( 120 void ProfileImplIOData::Handle::Init(
124 const base::FilePath& cookie_path, 121 const base::FilePath& cookie_path,
125 const base::FilePath& channel_id_path, 122 const base::FilePath& channel_id_path,
126 const base::FilePath& cache_path, 123 const base::FilePath& cache_path,
127 int cache_max_size, 124 int cache_max_size,
128 const base::FilePath& media_cache_path, 125 const base::FilePath& media_cache_path,
129 int media_cache_max_size, 126 int media_cache_max_size,
(...skipping 459 matching lines...) Expand 10 before | Expand all | Expand 10 after
589 // media cache. It shares the same job factory as the main context. 586 // media cache. It shares the same job factory as the main context.
590 StoragePartitionDescriptor details(profile_path_, false); 587 StoragePartitionDescriptor details(profile_path_, false);
591 media_request_context_.reset(InitializeMediaRequestContext(main_context, 588 media_request_context_.reset(InitializeMediaRequestContext(main_context,
592 details)); 589 details));
593 590
594 if (domain_reliability_monitor_) { 591 if (domain_reliability_monitor_) {
595 domain_reliability::DomainReliabilityMonitor* monitor = 592 domain_reliability::DomainReliabilityMonitor* monitor =
596 domain_reliability_monitor_.get(); 593 domain_reliability_monitor_.get();
597 monitor->InitURLRequestContext(main_context); 594 monitor->InitURLRequestContext(main_context);
598 monitor->AddBakedInConfigs(); 595 monitor->AddBakedInConfigs();
596 monitor->SetDiscardUploads(!GetMetricsEnabledStateOnIOThread());
599 network_delegate()->set_domain_reliability_monitor(monitor); 597 network_delegate()->set_domain_reliability_monitor(monitor);
600 } 598 }
601 599
602 lazy_params_.reset(); 600 lazy_params_.reset();
603 } 601 }
604 602
605 void ProfileImplIOData:: 603 void ProfileImplIOData::
606 InitializeExtensionsRequestContext(ProfileParams* profile_params) const { 604 InitializeExtensionsRequestContext(ProfileParams* profile_params) const {
607 net::URLRequestContext* extensions_context = extensions_request_context(); 605 net::URLRequestContext* extensions_context = extensions_request_context();
608 IOThread* const io_thread = profile_params->io_thread; 606 IOThread* const io_thread = profile_params->io_thread;
(...skipping 216 matching lines...) Expand 10 before | Expand all | Expand 10 after
825 const base::Closure& completion) { 823 const base::Closure& completion) {
826 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO)); 824 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO));
827 DCHECK(initialized()); 825 DCHECK(initialized());
828 826
829 DCHECK(transport_security_state()); 827 DCHECK(transport_security_state());
830 // Completes synchronously. 828 // Completes synchronously.
831 transport_security_state()->DeleteAllDynamicDataSince(time); 829 transport_security_state()->DeleteAllDynamicDataSince(time);
832 DCHECK(http_server_properties_manager_); 830 DCHECK(http_server_properties_manager_);
833 http_server_properties_manager_->Clear(completion); 831 http_server_properties_manager_->Clear(completion);
834 } 832 }
OLDNEW
« no previous file with comments | « chrome/browser/profiles/profile_impl.cc ('k') | components/domain_reliability/monitor.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698