blob: edda802becbf9c772061934fdb02192f86eb1039 [file] [log] [blame]
// Copyright (c) 2012 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 "base/memory/ref_counted.h"
#include "content/common/content_export.h"
namespace content {
// Interface for getting login credentials for HTTP auth requests. If the
// login delegate obtains credentials, it should call the URLRequest's SetAuth
// method. If the user cancels, the login delegate should call the URLRequest's
// CancelAuth instead. And in either case, it must make a call to
// ResourceDispatcherHost::ClearLoginDelegateForRequest.
class CONTENT_EXPORT LoginDelegate
: public base::RefCountedThreadSafe<LoginDelegate> {
// Notify the login delegate that the request was cancelled.
// This function can only be called from the IO thread.
virtual void OnRequestCancelled() = 0;
friend class base::RefCountedThreadSafe<LoginDelegate>;
virtual ~LoginDelegate() {}
} // namespace content