OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 "components/domain_reliability/monitor.h" | 5 #include "components/domain_reliability/monitor.h" |
6 | 6 |
7 #include <utility> | 7 #include <utility> |
8 | 8 |
9 #include "base/command_line.h" | 9 #include "base/command_line.h" |
10 #include "base/logging.h" | 10 #include "base/logging.h" |
(...skipping 155 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
166 if (!config) { | 166 if (!config) { |
167 DLOG(WARNING) << "Baked-in Domain Reliability config failed to parse: " | 167 DLOG(WARNING) << "Baked-in Domain Reliability config failed to parse: " |
168 << json; | 168 << json; |
169 continue; | 169 continue; |
170 } | 170 } |
171 context_manager_.AddContextForConfig(std::move(config)); | 171 context_manager_.AddContextForConfig(std::move(config)); |
172 } | 172 } |
173 | 173 |
174 std::vector<DomainReliabilityConfig*> google_configs; | 174 std::vector<DomainReliabilityConfig*> google_configs; |
175 GetAllGoogleConfigs(&google_configs); | 175 GetAllGoogleConfigs(&google_configs); |
176 for (auto google_config : google_configs) | 176 for (auto* google_config : google_configs) |
177 context_manager_.AddContextForConfig(base::WrapUnique(google_config)); | 177 context_manager_.AddContextForConfig(base::WrapUnique(google_config)); |
178 } | 178 } |
179 | 179 |
180 void DomainReliabilityMonitor::SetDiscardUploads(bool discard_uploads) { | 180 void DomainReliabilityMonitor::SetDiscardUploads(bool discard_uploads) { |
181 DCHECK(OnNetworkThread()); | 181 DCHECK(OnNetworkThread()); |
182 DCHECK(moved_to_network_thread_); | 182 DCHECK(moved_to_network_thread_); |
183 DCHECK(uploader_); | 183 DCHECK(uploader_); |
184 | 184 |
185 uploader_->set_discard_uploads(discard_uploads); | 185 uploader_->set_discard_uploads(discard_uploads); |
186 discard_uploads_set_ = true; | 186 discard_uploads_set_ = true; |
(...skipping 228 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
415 break; | 415 break; |
416 } | 416 } |
417 } | 417 } |
418 | 418 |
419 base::WeakPtr<DomainReliabilityMonitor> | 419 base::WeakPtr<DomainReliabilityMonitor> |
420 DomainReliabilityMonitor::MakeWeakPtr() { | 420 DomainReliabilityMonitor::MakeWeakPtr() { |
421 return weak_factory_.GetWeakPtr(); | 421 return weak_factory_.GetWeakPtr(); |
422 } | 422 } |
423 | 423 |
424 } // namespace domain_reliability | 424 } // namespace domain_reliability |
OLD | NEW |