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

Side by Side Diff: chrome/browser/net/chrome_network_delegate.cc

Issue 2336043007: Domain Reliability: Don't crash on shutdown with uploads pending (Closed)
Patch Set: Shutdown uploader in unittest Created 4 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
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/net/chrome_network_delegate.h" 5 #include "chrome/browser/net/chrome_network_delegate.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 #include <stdlib.h> 8 #include <stdlib.h>
9 9
10 #include <vector> 10 #include <vector>
(...skipping 135 matching lines...) Expand 10 before | Expand all | Expand 10 after
146 extensions::EventRouterForwarder* event_router, 146 extensions::EventRouterForwarder* event_router,
147 BooleanPrefMember* enable_referrers, 147 BooleanPrefMember* enable_referrers,
148 const metrics::UpdateUsagePrefCallbackType& metrics_data_use_forwarder) 148 const metrics::UpdateUsagePrefCallbackType& metrics_data_use_forwarder)
149 : profile_(NULL), 149 : profile_(NULL),
150 enable_referrers_(enable_referrers), 150 enable_referrers_(enable_referrers),
151 enable_do_not_track_(NULL), 151 enable_do_not_track_(NULL),
152 force_google_safe_search_(NULL), 152 force_google_safe_search_(NULL),
153 force_youtube_safety_mode_(NULL), 153 force_youtube_safety_mode_(NULL),
154 allowed_domains_for_apps_(nullptr), 154 allowed_domains_for_apps_(nullptr),
155 url_blacklist_manager_(NULL), 155 url_blacklist_manager_(NULL),
156 domain_reliability_monitor_(NULL),
157 data_use_measurement_(metrics_data_use_forwarder), 156 data_use_measurement_(metrics_data_use_forwarder),
158 experimental_web_platform_features_enabled_( 157 experimental_web_platform_features_enabled_(
159 base::CommandLine::ForCurrentProcess()->HasSwitch( 158 base::CommandLine::ForCurrentProcess()->HasSwitch(
160 switches::kEnableExperimentalWebPlatformFeatures)), 159 switches::kEnableExperimentalWebPlatformFeatures)),
161 data_use_aggregator_(nullptr), 160 data_use_aggregator_(nullptr),
162 is_data_usage_off_the_record_(true) { 161 is_data_usage_off_the_record_(true) {
163 DCHECK(enable_referrers); 162 DCHECK(enable_referrers);
164 extensions_delegate_.reset( 163 extensions_delegate_.reset(
165 ChromeExtensionsNetworkDelegate::Create(event_router)); 164 ChromeExtensionsNetworkDelegate::Create(event_router));
166 } 165 }
(...skipping 422 matching lines...) Expand 10 before | Expand all | Expand 10 after
589 if (!data_use_aggregator_) 588 if (!data_use_aggregator_)
590 return; 589 return;
591 590
592 if (is_data_usage_off_the_record_) { 591 if (is_data_usage_off_the_record_) {
593 data_use_aggregator_->ReportOffTheRecordDataUse(tx_bytes, rx_bytes); 592 data_use_aggregator_->ReportOffTheRecordDataUse(tx_bytes, rx_bytes);
594 return; 593 return;
595 } 594 }
596 595
597 data_use_aggregator_->ReportDataUse(request, tx_bytes, rx_bytes); 596 data_use_aggregator_->ReportDataUse(request, tx_bytes, rx_bytes);
598 } 597 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698