Popular sites on the NTP: Try to keep the ordering constant
[chromium-blink-merge.git] / content / public / browser / resource_dispatcher_host_login_delegate.h
blob0db8b8a9bd0598dc9817ae3ad990142c7989ace2
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
5 #ifndef CONTENT_PUBLIC_BROWSER_RESOURCE_DISPATCHER_HOST_LOGIN_DELEGATE_H_
6 #define CONTENT_PUBLIC_BROWSER_RESOURCE_DISPATCHER_HOST_LOGIN_DELEGATE_H_
8 #include "base/basictypes.h"
9 #include "base/memory/ref_counted.h"
10 #include "content/common/content_export.h"
12 namespace content {
14 // Interface for getting login credentials for HTTP auth requests. If the
15 // login delegate obtains credentials, it should call the URLRequest's SetAuth
16 // method. If the user cancels, the login delegate should call the URLRequest's
17 // CancelAuth instead. And in either case, it must make a call to
18 // ResourceDispatcherHost::ClearLoginDelegateForRequest.
19 class CONTENT_EXPORT ResourceDispatcherHostLoginDelegate
20 : public base::RefCountedThreadSafe<ResourceDispatcherHostLoginDelegate> {
21 public:
22 // Notify the login delegate that the request was cancelled.
23 // This function can only be called from the IO thread.
24 virtual void OnRequestCancelled() = 0;
26 protected:
27 friend class base::RefCountedThreadSafe<ResourceDispatcherHostLoginDelegate>;
28 virtual ~ResourceDispatcherHostLoginDelegate() {}
31 } // public content
33 #endif // CONTENT_PUBLIC_BROWSER_RESOURCE_DISPATCHER_HOST_LOGIN_DELEGATE_H_