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

Unified Diff: net/base/ssl_false_start_blacklist.cc

Issue 10014010: net: False Start only for NPN capable servers. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 8 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 side-by-side diff with in-line comments
Download patch
Index: net/base/ssl_false_start_blacklist.cc
diff --git a/net/base/ssl_false_start_blacklist.cc b/net/base/ssl_false_start_blacklist.cc
deleted file mode 100644
index d08852dc564552096e503447666e4cd288a54491..0000000000000000000000000000000000000000
--- a/net/base/ssl_false_start_blacklist.cc
+++ /dev/null
@@ -1,31 +0,0 @@
-// Copyright (c) 2011 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.
-
-#include "net/base/ssl_false_start_blacklist.h"
-
-namespace net {
-
-// static
-bool SSLFalseStartBlacklist::IsMember(const std::string& host) {
- const std::string last_two_components(LastTwoComponents(host));
- if (last_two_components.empty())
- return false;
-
- const size_t bucket = Hash(last_two_components) & (kBuckets - 1);
- for (size_t i = kHashTable[bucket]; i < kHashTable[bucket + 1]; ) {
- const size_t blacklist_entry_len = static_cast<uint8>(kHashData[i]);
- if (host.length() >= blacklist_entry_len &&
- !host.compare(host.length() - blacklist_entry_len, blacklist_entry_len,
- &kHashData[i + 1], blacklist_entry_len) &&
- (host.length() == blacklist_entry_len ||
- host[host.length() - blacklist_entry_len - 1] == '.')) {
- return true;
- }
- i += blacklist_entry_len + 1;
- }
-
- return false;
-}
-
-} // namespace net

Powered by Google App Engine
This is Rietveld 408576698