OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 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 | 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/ssl_blocking_page.h" | 5 #include "chrome/browser/ssl/ssl_blocking_page.h" |
6 | 6 |
7 #include "base/i18n/rtl.h" | 7 #include "base/i18n/rtl.h" |
8 #include "base/metrics/histogram.h" | 8 #include "base/metrics/histogram.h" |
9 #include "base/strings/string_number_conversions.h" | 9 #include "base/strings/string_number_conversions.h" |
10 #include "base/strings/string_piece.h" | 10 #include "base/strings/string_piece.h" |
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
42 #include "chrome/browser/captive_portal/captive_portal_service.h" | 42 #include "chrome/browser/captive_portal/captive_portal_service.h" |
43 #include "chrome/browser/captive_portal/captive_portal_service_factory.h" | 43 #include "chrome/browser/captive_portal/captive_portal_service_factory.h" |
44 #endif | 44 #endif |
45 | 45 |
46 #if defined(OS_WIN) | 46 #if defined(OS_WIN) |
47 #include "base/win/windows_version.h" | 47 #include "base/win/windows_version.h" |
48 #endif | 48 #endif |
49 | 49 |
50 using base::ASCIIToUTF16; | 50 using base::ASCIIToUTF16; |
51 using base::TimeTicks; | 51 using base::TimeTicks; |
| 52 using captive_portal::CaptivePortalDetector; |
52 using content::InterstitialPage; | 53 using content::InterstitialPage; |
53 using content::NavigationController; | 54 using content::NavigationController; |
54 using content::NavigationEntry; | 55 using content::NavigationEntry; |
55 | 56 |
56 namespace { | 57 namespace { |
57 | 58 |
58 // These represent the commands sent by ssl_roadblock.html. | 59 // These represent the commands sent by ssl_roadblock.html. |
59 enum SSLBlockingPageCommands { | 60 enum SSLBlockingPageCommands { |
60 CMD_DONT_PROCEED, | 61 CMD_DONT_PROCEED, |
61 CMD_PROCEED, | 62 CMD_PROCEED, |
(...skipping 474 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
536 // sure we don't clear the captive portal flag, since the interstitial was | 537 // sure we don't clear the captive portal flag, since the interstitial was |
537 // potentially caused by the captive portal. | 538 // potentially caused by the captive portal. |
538 captive_portal_detected_ = captive_portal_detected_ || | 539 captive_portal_detected_ = captive_portal_detected_ || |
539 (results->result == captive_portal::RESULT_BEHIND_CAPTIVE_PORTAL); | 540 (results->result == captive_portal::RESULT_BEHIND_CAPTIVE_PORTAL); |
540 // Also keep track of non-HTTP portals and error cases. | 541 // Also keep track of non-HTTP portals and error cases. |
541 captive_portal_no_response_ = captive_portal_no_response_ || | 542 captive_portal_no_response_ = captive_portal_no_response_ || |
542 (results->result == captive_portal::RESULT_NO_RESPONSE); | 543 (results->result == captive_portal::RESULT_NO_RESPONSE); |
543 } | 544 } |
544 #endif | 545 #endif |
545 } | 546 } |
OLD | NEW |