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

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

Issue 252613002: Domain Reliability: More security review. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: ;_; Created 6 years, 7 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 | « no previous file | components/domain_reliability/DEPS » ('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 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
47 #include "net/url_request/protocol_intercept_job_factory.h" 47 #include "net/url_request/protocol_intercept_job_factory.h"
48 #include "net/url_request/url_request_job_factory_impl.h" 48 #include "net/url_request/url_request_job_factory_impl.h"
49 #include "webkit/browser/quota/special_storage_policy.h" 49 #include "webkit/browser/quota/special_storage_policy.h"
50 50
51 #if defined(OS_ANDROID) || defined(OS_IOS) 51 #if defined(OS_ANDROID) || defined(OS_IOS)
52 #include "components/data_reduction_proxy/browser/data_reduction_proxy_settings. h" 52 #include "components/data_reduction_proxy/browser/data_reduction_proxy_settings. h"
53 #endif 53 #endif
54 54
55 namespace { 55 namespace {
56 56
57 // Identifies Chrome as the source of Domain Reliability uploads it sends.
58 const char* kDomainReliabilityUploadReporterString = "chrome";
59
57 net::BackendType ChooseCacheBackendType() { 60 net::BackendType ChooseCacheBackendType() {
58 #if defined(OS_ANDROID) 61 #if defined(OS_ANDROID)
59 return net::CACHE_BACKEND_SIMPLE; 62 return net::CACHE_BACKEND_SIMPLE;
60 #else 63 #else
61 const CommandLine& command_line = *CommandLine::ForCurrentProcess(); 64 const CommandLine& command_line = *CommandLine::ForCurrentProcess();
62 if (command_line.HasSwitch(switches::kUseSimpleCacheBackend)) { 65 if (command_line.HasSwitch(switches::kUseSimpleCacheBackend)) {
63 const std::string opt_value = 66 const std::string opt_value =
64 command_line.GetSwitchValueASCII(switches::kUseSimpleCacheBackend); 67 command_line.GetSwitchValueASCII(switches::kUseSimpleCacheBackend);
65 if (LowerCaseEqualsASCII(opt_value, "off")) 68 if (LowerCaseEqualsASCII(opt_value, "off"))
66 return net::CACHE_BACKEND_BLOCKFILE; 69 return net::CACHE_BACKEND_BLOCKFILE;
(...skipping 429 matching lines...) Expand 10 before | Expand all | Expand 10 after
496 #endif 499 #endif
497 500
498 // Create a media request context based on the main context, but using a 501 // Create a media request context based on the main context, but using a
499 // media cache. It shares the same job factory as the main context. 502 // media cache. It shares the same job factory as the main context.
500 StoragePartitionDescriptor details(profile_path_, false); 503 StoragePartitionDescriptor details(profile_path_, false);
501 media_request_context_.reset(InitializeMediaRequestContext(main_context, 504 media_request_context_.reset(InitializeMediaRequestContext(main_context,
502 details)); 505 details));
503 506
504 if (IsDomainReliabilityMonitoringEnabled()) { 507 if (IsDomainReliabilityMonitoringEnabled()) {
505 domain_reliability_monitor_.reset( 508 domain_reliability_monitor_.reset(
506 new domain_reliability::DomainReliabilityMonitor(main_context)); 509 new domain_reliability::DomainReliabilityMonitor(
510 main_context, kDomainReliabilityUploadReporterString));
507 domain_reliability_monitor_->AddBakedInConfigs(); 511 domain_reliability_monitor_->AddBakedInConfigs();
508 network_delegate()->set_domain_reliability_monitor( 512 network_delegate()->set_domain_reliability_monitor(
509 domain_reliability_monitor_.get()); 513 domain_reliability_monitor_.get());
510 } 514 }
511 515
512 lazy_params_.reset(); 516 lazy_params_.reset();
513 } 517 }
514 518
515 void ProfileImplIOData:: 519 void ProfileImplIOData::
516 InitializeExtensionsRequestContext(ProfileParams* profile_params) const { 520 InitializeExtensionsRequestContext(ProfileParams* profile_params) const {
(...skipping 215 matching lines...) Expand 10 before | Expand all | Expand 10 after
732 const base::Closure& completion) { 736 const base::Closure& completion) {
733 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO)); 737 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO));
734 DCHECK(initialized()); 738 DCHECK(initialized());
735 739
736 DCHECK(transport_security_state()); 740 DCHECK(transport_security_state());
737 // Completes synchronously. 741 // Completes synchronously.
738 transport_security_state()->DeleteAllDynamicDataSince(time); 742 transport_security_state()->DeleteAllDynamicDataSince(time);
739 DCHECK(http_server_properties_manager_); 743 DCHECK(http_server_properties_manager_);
740 http_server_properties_manager_->Clear(completion); 744 http_server_properties_manager_->Clear(completion);
741 } 745 }
OLDNEW
« no previous file with comments | « no previous file | components/domain_reliability/DEPS » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698