OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 #ifndef IOS_WEB_PUBLIC_TEST_FAKES_TEST_WEB_CLIENT_H_ | 5 #ifndef IOS_WEB_PUBLIC_TEST_FAKES_TEST_WEB_CLIENT_H_ |
6 #define IOS_WEB_PUBLIC_TEST_FAKES_TEST_WEB_CLIENT_H_ | 6 #define IOS_WEB_PUBLIC_TEST_FAKES_TEST_WEB_CLIENT_H_ |
7 | 7 |
8 #import <Foundation/Foundation.h> | 8 #import <Foundation/Foundation.h> |
9 | 9 |
10 #include "base/compiler_specific.h" | 10 #include "base/compiler_specific.h" |
11 #import "base/mac/scoped_nsobject.h" | |
12 #import "ios/web/public/web_client.h" | 11 #import "ios/web/public/web_client.h" |
13 #include "net/ssl/ssl_info.h" | 12 #include "net/ssl/ssl_info.h" |
14 #include "url/gurl.h" | 13 #include "url/gurl.h" |
15 | 14 |
16 namespace web { | 15 namespace web { |
17 | 16 |
18 class BrowserState; | 17 class BrowserState; |
19 | 18 |
20 // A WebClient used for testing purposes. | 19 // A WebClient used for testing purposes. |
21 class TestWebClient : public web::WebClient { | 20 class TestWebClient : public web::WebClient { |
(...skipping 21 matching lines...) Expand all Loading... |
43 int last_cert_error_code() const { return last_cert_error_code_; }; | 42 int last_cert_error_code() const { return last_cert_error_code_; }; |
44 const net::SSLInfo& last_cert_error_ssl_info() const { | 43 const net::SSLInfo& last_cert_error_ssl_info() const { |
45 return last_cert_error_ssl_info_; | 44 return last_cert_error_ssl_info_; |
46 } | 45 } |
47 const GURL& last_cert_error_request_url() const { | 46 const GURL& last_cert_error_request_url() const { |
48 return last_cert_error_request_url_; | 47 return last_cert_error_request_url_; |
49 } | 48 } |
50 bool last_cert_error_overridable() { return last_cert_error_overridable_; } | 49 bool last_cert_error_overridable() { return last_cert_error_overridable_; } |
51 | 50 |
52 private: | 51 private: |
53 base::scoped_nsobject<NSString> early_page_script_; | 52 NSString* early_page_script_; |
54 // Last arguments passed to AllowCertificateError. | 53 // Last arguments passed to AllowCertificateError. |
55 int last_cert_error_code_; | 54 int last_cert_error_code_; |
56 net::SSLInfo last_cert_error_ssl_info_; | 55 net::SSLInfo last_cert_error_ssl_info_; |
57 GURL last_cert_error_request_url_; | 56 GURL last_cert_error_request_url_; |
58 bool last_cert_error_overridable_; | 57 bool last_cert_error_overridable_; |
59 }; | 58 }; |
60 | 59 |
61 } // namespace web | 60 } // namespace web |
62 | 61 |
63 #endif // IOS_WEB_PUBLIC_TEST_FAKES_TEST_WEB_CLIENT_H_ | 62 #endif // IOS_WEB_PUBLIC_TEST_FAKES_TEST_WEB_CLIENT_H_ |
OLD | NEW |