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

Unified Diff: net/websockets/websocket_extension_parser.h

Issue 992733002: Remove //net (except for Android test stuff) and sdch (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 5 years, 9 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
« no previous file with comments | « net/websockets/websocket_extension.cc ('k') | net/websockets/websocket_extension_parser.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/websockets/websocket_extension_parser.h
diff --git a/net/websockets/websocket_extension_parser.h b/net/websockets/websocket_extension_parser.h
deleted file mode 100644
index ef7fe0366575c696f039008d4989246f6b5b43a2..0000000000000000000000000000000000000000
--- a/net/websockets/websocket_extension_parser.h
+++ /dev/null
@@ -1,59 +0,0 @@
-// Copyright 2013 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_WEBSOCKETS_WEBSOCKET_EXTENSION_PARSER_H_
-#define NET_WEBSOCKETS_WEBSOCKET_EXTENSION_PARSER_H_
-
-#include <string>
-
-#include "base/strings/string_piece.h"
-#include "net/base/net_export.h"
-#include "net/websockets/websocket_extension.h"
-
-namespace net {
-
-class NET_EXPORT_PRIVATE WebSocketExtensionParser {
- public:
- WebSocketExtensionParser();
- ~WebSocketExtensionParser();
-
- // Parses the given string as a WebSocket extension header value.
- // This parser assumes some preprocesses are made.
- // - The parser parses single extension at a time. This means that
- // the parser parses |extension| in RFC6455 9.1, not |extension-list|.
- // - There is no newline characters in the input. LWS-concatenation must
- // have already been done.
- void Parse(const char* data, size_t size);
- void Parse(const std::string& data) {
- Parse(data.data(), data.size());
- }
-
- bool has_error() const { return has_error_; }
- const WebSocketExtension& extension() const { return extension_; }
-
- private:
- void Consume(char c);
- void ConsumeExtension(WebSocketExtension* extension);
- void ConsumeExtensionParameter(WebSocketExtension::Parameter* parameter);
- void ConsumeToken(base::StringPiece* token);
- void ConsumeQuotedToken(std::string* token);
- void ConsumeSpaces();
- bool Lookahead(char c);
- bool ConsumeIfMatch(char c);
- size_t UnconsumedBytes() const { return end_ - current_; }
-
- static bool IsControl(char c);
- static bool IsSeparator(char c);
-
- const char* current_;
- const char* end_;
- bool has_error_;
- WebSocketExtension extension_;
-
- DISALLOW_COPY_AND_ASSIGN(WebSocketExtensionParser);
-};
-
-} // namespace net
-
-#endif // NET_WEBSOCKETS_WEBSOCKET_EXTENSION_PARSER_H_
« no previous file with comments | « net/websockets/websocket_extension.cc ('k') | net/websockets/websocket_extension_parser.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698