Chromium Code Reviews| Index: net/base/swr_histogram_domains/swr_histogram_domains.h |
| diff --git a/net/base/swr_histogram_domains/swr_histogram_domains.h b/net/base/swr_histogram_domains/swr_histogram_domains.h |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..d1d6125f982325ac88515448980c216996691cd1 |
| --- /dev/null |
| +++ b/net/base/swr_histogram_domains/swr_histogram_domains.h |
| @@ -0,0 +1,27 @@ |
| +// Copyright 2015 The Chromium Authors. All rights reserved. |
| +// Use of this source code is governed by a BSD-style license that can be |
| +// found in the LICENSE file. |
| + |
| +#ifndef NET_BASE_SWR_HISTOGRAM_DOMAINS_SWR_HISTOGRAM_DOMAINS_H_ |
| +#define NET_BASE_SWR_HISTOGRAM_DOMAINS_SWR_HISTOGRAM_DOMAINS_H_ |
| + |
| +#include "base/strings/string_piece.h" |
| +#include "net/base/net_export.h" |
| + |
| +namespace net { |
| + |
| +namespace swr_histogram_domains { |
| + |
| +// Returns true if |host| matches one of the domains of interest for |
| +// stale-while-revalidate histograms. If "example.com" was in the list, then |
| +// "example.com" would match, as would "www.example.com" and "a.b.example.com", |
| +// but not "com" or "an-example.com". Trailing '.' characters on |host| are |
| +// ignored. |host| is expected to have be canonicalised to lowercase (as |
|
tyoshino (SeeGerritForStatus)
2015/11/04 08:34:07
remove "have"?
Adam Rice
2015/11/05 05:30:40
Done.
|
| +// performed by GURL). |
| +bool NET_EXPORT IsHostInSWRHistogramDomain(const base::StringPiece& host); |
| + |
| +} // namespace swr_histogram_domains |
| + |
| +} // namespace net |
| + |
| +#endif // NET_BASE_SWR_HISTOGRAM_DOMAINS_SWR_HISTOGRAM_DOMAINS_H_ |