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

Unified Diff: services/authenticating_url_loader/authenticating_url_loader_impl.h

Issue 1155283003: Change AuthenticatingURLLoader to be a URLLoaderInterceptor (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Address review Created 5 years, 6 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: services/authenticating_url_loader/authenticating_url_loader_impl.h
diff --git a/services/authenticating_url_loader/authenticating_url_loader_impl.h b/services/authenticating_url_loader/authenticating_url_loader_impl.h
deleted file mode 100644
index 89f2213641779e02285c9eb615a10460c2ac0e7c..0000000000000000000000000000000000000000
--- a/services/authenticating_url_loader/authenticating_url_loader_impl.h
+++ /dev/null
@@ -1,63 +0,0 @@
-// Copyright 2014 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 SERVICES_AUTHENTICATING_URL_LOADER_AUTHENTICATING_URL_LOADER_IMPL_H_
-#define SERVICES_AUTHENTICATING_URL_LOADER_AUTHENTICATING_URL_LOADER_IMPL_H_
-
-#include "mojo/public/cpp/bindings/binding.h"
-#include "mojo/public/cpp/bindings/error_handler.h"
-#include "mojo/services/authenticating_url_loader/public/interfaces/authenticating_url_loader.mojom.h"
-#include "mojo/services/network/public/interfaces/url_loader.mojom.h"
-#include "services/authenticating_url_loader/authenticating_url_loader_factory_impl.h"
-#include "url/gurl.h"
-
-namespace mojo {
-
-class NetworkService;
-
-enum RequestAuthorizationState {
- REQUEST_INITIAL,
- REQUEST_USED_CURRENT_AUTH_SERVICE_TOKEN,
- REQUEST_USED_FRESH_AUTH_SERVICE_TOKEN,
-};
-
-class AuthenticatingURLLoaderImpl : public AuthenticatingURLLoader,
- public ErrorHandler {
- public:
- AuthenticatingURLLoaderImpl(InterfaceRequest<AuthenticatingURLLoader> request,
- AuthenticatingURLLoaderFactoryImpl* factory);
- ~AuthenticatingURLLoaderImpl() override;
-
- private:
- // AuthenticatingURLLoader methods:
- void Start(URLRequestPtr request,
- const Callback<void(URLResponsePtr)>& callback) override;
- void FollowRedirect(const Callback<void(URLResponsePtr)>& callback) override;
-
- // ErrorHandler methods:
- void OnConnectionError() override;
-
- void StartNetworkRequest(URLRequestPtr request);
-
- void OnLoadComplete(URLResponsePtr response);
-
- void FollowRedirectInternal();
-
- void OnOAuth2TokenReceived(std::string token);
-
- Binding<AuthenticatingURLLoader> binding_;
- AuthenticatingURLLoaderFactoryImpl* factory_;
- URLLoaderPtr url_loader_;
- URLResponsePtr pending_response_;
- RequestAuthorizationState request_authorization_state_;
- GURL url_;
- bool auto_follow_redirects_;
- bool bypass_cache_;
- Array<HttpHeaderPtr> headers_;
- Callback<void(URLResponsePtr)> pending_request_callback_;
-};
-
-} // namespace mojo
-
-#endif // SERVICES_AUTHENTICATING_URL_LOADER_AUTHENTICATING_URL_LOADER_IMPL_H_

Powered by Google App Engine
This is Rietveld 408576698