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

Unified Diff: net/base/stale_while_revalidate_experiment_domains.h

Issue 1433893002: Add StaleWhileRevalidateExperiment histograms. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@s-w-r-dafsa
Patch Set: Created 5 years, 1 month 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 side-by-side diff with in-line comments
Download patch
Index: net/base/stale_while_revalidate_experiment_domains.h
diff --git a/net/base/stale_while_revalidate_experiment_domains.h b/net/base/stale_while_revalidate_experiment_domains.h
new file mode 100644
index 0000000000000000000000000000000000000000..f0935a342f393f6073fa5c2003cd7390b062ec95
--- /dev/null
+++ b/net/base/stale_while_revalidate_experiment_domains.h
@@ -0,0 +1,24 @@
+// 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_STALE_WHILE_REVALIDATE_EXPERIMENT_DOMAINS_H_
+#define NET_BASE_STALE_WHILE_REVALIDATE_EXPERIMENT_DOMAINS_H_
+
+#include "base/strings/string_piece.h"
+#include "net/base/net_export.h"
+
+namespace net {
+
+// 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 be canonicalised to lowercase (as performed by
+// GURL).
kinuko 2015/11/17 08:18:48 Maybe also add a TODO comment to eventually remove
Adam Rice 2015/11/17 18:29:20 Done.
+NET_EXPORT bool IsHostInStaleWhileRevalidateExperimentDomain(
+ const base::StringPiece& host);
+
+} // namespace net
+
+#endif // NET_BASE_STALE_WHILE_REVALIDATE_EXPERIMENT_DOMAINS_H_

Powered by Google App Engine
This is Rietveld 408576698