OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "content/shell/browser/shell_resource_dispatcher_host_delegate.h" | 5 #include "content/shell/browser/shell_resource_dispatcher_host_delegate.h" |
6 | 6 |
7 #include "base/command_line.h" | 7 #include "base/command_line.h" |
| 8 #include "build/build_config.h" |
8 #include "content/shell/browser/shell_login_dialog.h" | 9 #include "content/shell/browser/shell_login_dialog.h" |
9 #include "content/shell/common/shell_switches.h" | 10 #include "content/shell/common/shell_switches.h" |
10 | 11 |
11 namespace content { | 12 namespace content { |
12 | 13 |
13 ShellResourceDispatcherHostDelegate::ShellResourceDispatcherHostDelegate() { | 14 ShellResourceDispatcherHostDelegate::ShellResourceDispatcherHostDelegate() { |
14 } | 15 } |
15 | 16 |
16 ShellResourceDispatcherHostDelegate::~ShellResourceDispatcherHostDelegate() { | 17 ShellResourceDispatcherHostDelegate::~ShellResourceDispatcherHostDelegate() { |
17 } | 18 } |
18 | 19 |
19 ResourceDispatcherHostLoginDelegate* | 20 ResourceDispatcherHostLoginDelegate* |
20 ShellResourceDispatcherHostDelegate::CreateLoginDelegate( | 21 ShellResourceDispatcherHostDelegate::CreateLoginDelegate( |
21 net::AuthChallengeInfo* auth_info, net::URLRequest* request) { | 22 net::AuthChallengeInfo* auth_info, net::URLRequest* request) { |
22 if (!login_request_callback_.is_null()) { | 23 if (!login_request_callback_.is_null()) { |
23 login_request_callback_.Run(); | 24 login_request_callback_.Run(); |
24 login_request_callback_.Reset(); | 25 login_request_callback_.Reset(); |
25 return NULL; | 26 return NULL; |
26 } | 27 } |
27 | 28 |
28 #if !defined(OS_MACOSX) | 29 #if !defined(OS_MACOSX) |
29 // TODO: implement ShellLoginDialog for other platforms, drop this #if | 30 // TODO: implement ShellLoginDialog for other platforms, drop this #if |
30 return NULL; | 31 return NULL; |
31 #else | 32 #else |
32 return new ShellLoginDialog(auth_info, request); | 33 return new ShellLoginDialog(auth_info, request); |
33 #endif | 34 #endif |
34 } | 35 } |
35 | 36 |
36 } // namespace content | 37 } // namespace content |
OLD | NEW |