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

Unified Diff: net/quic/quic_client_push_promise_index.h

Issue 2193073003: Move shared files in net/quic/ into net/quic/core/ (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: io_thread_unittest.cc 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « net/quic/quic_client_promised_info_test.cc ('k') | net/quic/quic_client_push_promise_index.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/quic/quic_client_push_promise_index.h
diff --git a/net/quic/quic_client_push_promise_index.h b/net/quic/quic_client_push_promise_index.h
deleted file mode 100644
index f8167ae01af3c5e024bf2af08045055d994da009..0000000000000000000000000000000000000000
--- a/net/quic/quic_client_push_promise_index.h
+++ /dev/null
@@ -1,98 +0,0 @@
-// Copyright 2016 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_QUIC_QUIC_CLIENT_PUSH_PROMISE_INDEX_H_
-#define NET_QUIC_QUIC_CLIENT_PUSH_PROMISE_INDEX_H_
-
-#include <string>
-
-#include "net/quic/quic_client_session_base.h"
-#include "net/quic/quic_types.h"
-
-namespace net {
-
-// QuicClientPushPromiseIndex is the interface to support rendezvous
-// between client requests and resources delivered via server push.
-// The same index can be shared across multiple sessions (e.g. for the
-// same browser users profile), since cross-origin pushes are allowed
-// (subject to authority constraints).
-
-class NET_EXPORT_PRIVATE QuicClientPushPromiseIndex {
- public:
- // Delegate is used to complete the rendezvous that began with
- // |Try()|.
- class NET_EXPORT_PRIVATE Delegate {
- public:
- virtual ~Delegate() {}
-
- // The primary lookup matched request with push promise by URL. A
- // secondary match is necessary to ensure Vary (RFC 2616, 14.14)
- // is honored. If Vary is not present, return true. If Vary is
- // present, return whether designated header fields of
- // |promise_request| and |client_request| match.
- virtual bool CheckVary(const SpdyHeaderBlock& client_request,
- const SpdyHeaderBlock& promise_request,
- const SpdyHeaderBlock& promise_response) = 0;
-
- // On rendezvous success, provides the promised |stream|. Callee
- // does not inherit ownership of |stream|. On rendezvous failure,
- // |stream| is |nullptr| and the client should retry the request.
- // Rendezvous can fail due to promise validation failure or RST on
- // promised stream. |url| will have been removed from the index
- // before |OnRendezvousResult()| is invoked, so a recursive call to
- // |Try()| will return |QUIC_FAILURE|, which may be convenient for
- // retry purposes.
- virtual void OnRendezvousResult(QuicSpdyStream* stream) = 0;
- };
-
- class NET_EXPORT_PRIVATE TryHandle {
- public:
- // Cancel the request.
- virtual void Cancel() = 0;
-
- protected:
- TryHandle() {}
- ~TryHandle();
-
- private:
- DISALLOW_COPY_AND_ASSIGN(TryHandle);
- };
-
- QuicClientPushPromiseIndex();
- virtual ~QuicClientPushPromiseIndex();
-
- // Called by client code, used to enforce affinity between requests
- // for promised streams and the session the promise came from.
- QuicClientPromisedInfo* GetPromised(const std::string& url);
-
- // Called by client code, to initiate rendezvous between a request
- // and a server push stream. If |request|'s url is in the index,
- // rendezvous will be attempted and may complete immediately or
- // asynchronously. If the matching promise and response headers
- // have already arrived, the delegate's methods will fire
- // recursively from within |Try()|. Returns |QUIC_SUCCESS| if the
- // rendezvous was a success. Returns |QUIC_FAILURE| if there was no
- // matching promise, or if there was but the rendezvous has failed.
- // Returns QUIC_PENDING if a matching promise was found, but the
- // rendezvous needs to complete asynchronously because the promised
- // response headers are not yet available. If result is
- // QUIC_PENDING, then |*handle| will set so that the caller may
- // cancel the request if need be. The caller does not inherit
- // ownership of |*handle|, and it ceases to be valid if the caller
- // invokes |handle->Cancel()| or if |delegate->OnReponse()| fires.
- QuicAsyncStatus Try(const SpdyHeaderBlock& request,
- Delegate* delegate,
- TryHandle** handle);
-
- QuicPromisedByUrlMap* promised_by_url() { return &promised_by_url_; }
-
- private:
- QuicPromisedByUrlMap promised_by_url_;
-
- DISALLOW_COPY_AND_ASSIGN(QuicClientPushPromiseIndex);
-};
-
-} // namespace net
-
-#endif // NET_QUIC_QUIC_CLIENT_PUSH_PROMISE_INDEX_H_
« no previous file with comments | « net/quic/quic_client_promised_info_test.cc ('k') | net/quic/quic_client_push_promise_index.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698