suppress unaddr error at WebResourceService::StartFetch
[chromium-blink-merge.git] / android_webview / browser / aw_login_delegate.h
blobba6c9e38efa6603932bdb4575d257be6394eef72
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 ANDROID_WEBVIEW_BROWSER_AW_LOGIN_DELEGATE_H_
6 #define ANDROID_WEBVIEW_BROWSER_AW_LOGIN_DELEGATE_H_
8 #include "android_webview/browser/aw_http_auth_handler_base.h"
9 #include "base/memory/ref_counted.h"
10 #include "base/memory/scoped_ptr.h"
11 #include "base/strings/string16.h"
12 #include "components/data_reduction_proxy/browser/data_reduction_proxy_auth_request_handler.h"
13 #include "content/public/browser/resource_dispatcher_host_login_delegate.h"
15 namespace net {
16 class AuthChallengeInfo;
17 class URLRequest;
20 using data_reduction_proxy::DataReductionProxyAuthRequestHandler;
22 namespace android_webview {
24 class AwLoginDelegate :
25 public content::ResourceDispatcherHostLoginDelegate {
26 public:
27 AwLoginDelegate(net::AuthChallengeInfo* auth_info,
28 net::URLRequest* request);
30 virtual void Proceed(const base::string16& user,
31 const base::string16& password);
32 virtual void Cancel();
34 // from ResourceDispatcherHostLoginDelegate
35 virtual void OnRequestCancelled() OVERRIDE;
37 private:
38 virtual ~AwLoginDelegate();
39 void HandleHttpAuthRequestOnUIThread(bool first_auth_attempt);
40 void CancelOnIOThread();
41 void ProceedOnIOThread(const base::string16& user,
42 const base::string16& password);
43 void DeleteAuthHandlerSoon();
45 scoped_ptr<AwHttpAuthHandlerBase> aw_http_auth_handler_;
46 scoped_refptr<net::AuthChallengeInfo> auth_info_;
47 net::URLRequest* request_;
48 int render_process_id_;
49 int render_frame_id_;
50 scoped_ptr<DataReductionProxyAuthRequestHandler> drp_auth_handler_;
53 } // namespace android_webview
55 #endif // ANDROID_WEBVIEW_BROWSER_AW_LOGIN_DELEGATE_H_