Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(939)

Side by Side Diff: chrome/browser/ssl/ssl_error_handler.cc

Issue 2716493004: Renamed NavigationHandle::IsSamePage to NavigationHandle::IsSameDocument (Closed)
Patch Set: Rebased Created 3 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 #include "chrome/browser/ssl/ssl_error_handler.h" 5 #include "chrome/browser/ssl/ssl_error_handler.h"
6 6
7 #include <stdint.h> 7 #include <stdint.h>
8 #include <unordered_set> 8 #include <unordered_set>
9 #include <utility> 9 #include <utility>
10 10
(...skipping 683 matching lines...) Expand 10 before | Expand all | Expand 10 after
694 ShowCaptivePortalInterstitial(results->landing_url); 694 ShowCaptivePortalInterstitial(results->landing_url);
695 else 695 else
696 ShowSSLInterstitial(); 696 ShowSSLInterstitial();
697 #else 697 #else
698 NOTREACHED(); 698 NOTREACHED();
699 #endif 699 #endif
700 } 700 }
701 701
702 void SSLErrorHandler::DidStartNavigation( 702 void SSLErrorHandler::DidStartNavigation(
703 content::NavigationHandle* navigation_handle) { 703 content::NavigationHandle* navigation_handle) {
704 if (!navigation_handle->IsInMainFrame() || navigation_handle->IsSamePage()) 704 if (!navigation_handle->IsInMainFrame() ||
705 navigation_handle->IsSameDocument()) {
705 return; 706 return;
707 }
706 708
707 // Destroy the error handler on all new navigations. This ensures that the 709 // Destroy the error handler on all new navigations. This ensures that the
708 // handler is properly recreated when a hanging page is navigated to an SSL 710 // handler is properly recreated when a hanging page is navigated to an SSL
709 // error, even when the tab's WebContents doesn't change. 711 // error, even when the tab's WebContents doesn't change.
710 DeleteSSLErrorHandler(); 712 DeleteSSLErrorHandler();
711 } 713 }
712 714
713 void SSLErrorHandler::NavigationStopped() { 715 void SSLErrorHandler::NavigationStopped() {
714 // Destroy the error handler when the page load is stopped. 716 // Destroy the error handler when the page load is stopped.
715 DeleteSSLErrorHandler(); 717 DeleteSSLErrorHandler();
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
768 network_time::NetworkTimeTracker* tracker = 770 network_time::NetworkTimeTracker* tracker =
769 g_config.Pointer()->network_time_tracker(); 771 g_config.Pointer()->network_time_tracker();
770 ssl_errors::ClockState clock_state = ssl_errors::GetClockState(now, tracker); 772 ssl_errors::ClockState clock_state = ssl_errors::GetClockState(now, tracker);
771 if (clock_state == ssl_errors::CLOCK_STATE_FUTURE || 773 if (clock_state == ssl_errors::CLOCK_STATE_FUTURE ||
772 clock_state == ssl_errors::CLOCK_STATE_PAST) { 774 clock_state == ssl_errors::CLOCK_STATE_PAST) {
773 ShowBadClockInterstitial(now, clock_state); 775 ShowBadClockInterstitial(now, clock_state);
774 return; // |this| is deleted after showing the interstitial. 776 return; // |this| is deleted after showing the interstitial.
775 } 777 }
776 ShowSSLInterstitial(); 778 ShowSSLInterstitial();
777 } 779 }
OLDNEW
« no previous file with comments | « chrome/browser/ssl/security_state_tab_helper.cc ('k') | chrome/browser/supervised_user/supervised_user_navigation_observer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698