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

Side by Side Diff: components/domain_reliability/config.cc

Issue 2110663002: components: Change auto to not deduce raw pointers. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase+one fix Created 4 years, 5 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 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 // Make sure stdint.h includes SIZE_MAX. (See C89, p259, footnote 221.) 5 // Make sure stdint.h includes SIZE_MAX. (See C89, p259, footnote 221.)
6 #ifndef __STDC_LIMIT_MACROS 6 #ifndef __STDC_LIMIT_MACROS
7 #define __STDC_LIMIT_MACROS 1 7 #define __STDC_LIMIT_MACROS 1
8 #endif 8 #endif
9 9
10 #include "components/domain_reliability/config.h" 10 #include "components/domain_reliability/config.h"
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
63 return std::unique_ptr<const DomainReliabilityConfig>(); 63 return std::unique_ptr<const DomainReliabilityConfig>();
64 } 64 }
65 65
66 bool DomainReliabilityConfig::IsValid() const { 66 bool DomainReliabilityConfig::IsValid() const {
67 if (!origin.is_valid() || collectors.empty() || 67 if (!origin.is_valid() || collectors.empty() ||
68 !IsValidSampleRate(success_sample_rate) || 68 !IsValidSampleRate(success_sample_rate) ||
69 !IsValidSampleRate(failure_sample_rate)) { 69 !IsValidSampleRate(failure_sample_rate)) {
70 return false; 70 return false;
71 } 71 }
72 72
73 for (const auto& url : collectors) { 73 for (const auto* url : collectors) {
74 if (!url->is_valid()) 74 if (!url->is_valid())
75 return false; 75 return false;
76 } 76 }
77 77
78 return true; 78 return true;
79 } 79 }
80 80
81 bool DomainReliabilityConfig::Equals(const DomainReliabilityConfig& other) 81 bool DomainReliabilityConfig::Equals(const DomainReliabilityConfig& other)
82 const { 82 const {
83 if (include_subdomains != other.include_subdomains || 83 if (include_subdomains != other.include_subdomains ||
(...skipping 30 matching lines...) Expand all
114 "collectors", &DomainReliabilityConfig::collectors, &ConvertURL); 114 "collectors", &DomainReliabilityConfig::collectors, &ConvertURL);
115 converter->RegisterRepeatedString("path_prefixes", 115 converter->RegisterRepeatedString("path_prefixes",
116 &DomainReliabilityConfig::path_prefixes); 116 &DomainReliabilityConfig::path_prefixes);
117 converter->RegisterDoubleField("success_sample_rate", 117 converter->RegisterDoubleField("success_sample_rate",
118 &DomainReliabilityConfig::success_sample_rate); 118 &DomainReliabilityConfig::success_sample_rate);
119 converter->RegisterDoubleField("failure_sample_rate", 119 converter->RegisterDoubleField("failure_sample_rate",
120 &DomainReliabilityConfig::failure_sample_rate); 120 &DomainReliabilityConfig::failure_sample_rate);
121 } 121 }
122 122
123 } // namespace domain_reliability 123 } // namespace domain_reliability
OLDNEW
« no previous file with comments | « components/devtools_discovery/devtools_discovery_manager.cc ('k') | components/domain_reliability/context.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698