OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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 "chrome/browser/ssl/common_name_mismatch_handler.h" | 5 #include "chrome/browser/ssl/common_name_mismatch_handler.h" |
6 | 6 |
7 #include "base/callback_helpers.h" | 7 #include "base/callback_helpers.h" |
8 #include "base/logging.h" | 8 #include "base/logging.h" |
9 #include "base/strings/string_number_conversions.h" | 9 #include "base/strings/string_number_conversions.h" |
10 #include "components/ssl_errors/error_classification.h" | 10 #include "components/ssl_errors/error_classification.h" |
(...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
92 if (url_fetcher_.get()->GetResponseCode() == 200 && | 92 if (url_fetcher_.get()->GetResponseCode() == 200 && |
93 landing_url.SchemeIsCryptographic() && | 93 landing_url.SchemeIsCryptographic() && |
94 landing_url.host() != request_url_.host()) { | 94 landing_url.host() != request_url_.host()) { |
95 result = SUGGESTED_URL_AVAILABLE; | 95 result = SUGGESTED_URL_AVAILABLE; |
96 } | 96 } |
97 url_fetcher_.reset(); | 97 url_fetcher_.reset(); |
98 base::ResetAndReturn(&check_url_callback_).Run(result, suggested_url); | 98 base::ResetAndReturn(&check_url_callback_).Run(result, suggested_url); |
99 } | 99 } |
100 | 100 |
101 bool CommonNameMismatchHandler::IsCheckingSuggestedUrl() const { | 101 bool CommonNameMismatchHandler::IsCheckingSuggestedUrl() const { |
102 return url_fetcher_; | 102 return !!url_fetcher_; |
103 } | 103 } |
OLD | NEW |