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

Side by Side Diff: chrome/browser/safe_browsing/client_side_detection_host.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 (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/safe_browsing/client_side_detection_host.h" 5 #include "chrome/browser/safe_browsing/client_side_detection_host.h"
6 6
7 #include <memory> 7 #include <memory>
8 #include <utility> 8 #include <utility>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 349 matching lines...) Expand 10 before | Expand all | Expand 10 after
360 } 360 }
361 361
362 void ClientSideDetectionHost::DidFinishNavigation( 362 void ClientSideDetectionHost::DidFinishNavigation(
363 content::NavigationHandle* navigation_handle) { 363 content::NavigationHandle* navigation_handle) {
364 if (!navigation_handle->IsInMainFrame() || !navigation_handle->HasCommitted()) 364 if (!navigation_handle->IsInMainFrame() || !navigation_handle->HasCommitted())
365 return; 365 return;
366 366
367 // TODO(noelutz): move this DCHECK to WebContents and fix all the unit tests 367 // TODO(noelutz): move this DCHECK to WebContents and fix all the unit tests
368 // that don't call this method on the UI thread. 368 // that don't call this method on the UI thread.
369 // DCHECK_CURRENTLY_ON(BrowserThread::UI); 369 // DCHECK_CURRENTLY_ON(BrowserThread::UI);
370 if (navigation_handle->IsSamePage()) { 370 if (navigation_handle->IsSameDocument()) {
371 // If the navigation is within the same page, the user isn't really 371 // If the navigation is within the same document, the user isn't really
372 // navigating away. We don't need to cancel a pending callback or 372 // navigating away. We don't need to cancel a pending callback or
373 // begin a new classification. 373 // begin a new classification.
374 return; 374 return;
375 } 375 }
376 // Cancel any pending classification request. 376 // Cancel any pending classification request.
377 if (classification_request_.get()) { 377 if (classification_request_.get()) {
378 classification_request_->Cancel(); 378 classification_request_->Cancel();
379 } 379 }
380 // If we navigate away and there currently is a pending phishing 380 // If we navigate away and there currently is a pending phishing
381 // report request we have to cancel it to make sure we don't display 381 // report request we have to cancel it to make sure we don't display
(...skipping 343 matching lines...) Expand 10 before | Expand all | Expand 10 after
725 ui_manager_->RemoveObserver(this); 725 ui_manager_->RemoveObserver(this);
726 726
727 ui_manager_ = ui_manager; 727 ui_manager_ = ui_manager;
728 if (ui_manager) 728 if (ui_manager)
729 ui_manager_->AddObserver(this); 729 ui_manager_->AddObserver(this);
730 730
731 database_manager_ = database_manager; 731 database_manager_ = database_manager;
732 } 732 }
733 733
734 } // namespace safe_browsing 734 } // namespace safe_browsing
OLDNEW
« no previous file with comments | « chrome/browser/previews/previews_infobar_tab_helper.cc ('k') | chrome/browser/ssl/security_state_tab_helper.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698