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

Side by Side Diff: chrome/browser/safe_browsing/client_side_detection_host.cc

Issue 1008913002: Remove RenderViewHost parameter from WebContentsObserver::Did{Start|Stop}Loading. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 5 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 <vector> 7 #include <vector>
8 8
9 #include "base/logging.h" 9 #include "base/logging.h"
10 #include "base/memory/ref_counted.h" 10 #include "base/memory/ref_counted.h"
(...skipping 492 matching lines...) Expand 10 before | Expand all | Expand 10 after
503 bool should_classify) { 503 bool should_classify) {
504 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); 504 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
505 // If classification checks failed we should stop extracting malware features. 505 // If classification checks failed we should stop extracting malware features.
506 DVLOG(2) << "Malware pre-classification checks done. Should classify: " 506 DVLOG(2) << "Malware pre-classification checks done. Should classify: "
507 << should_classify; 507 << should_classify;
508 should_extract_malware_features_ = should_classify; 508 should_extract_malware_features_ = should_classify;
509 should_classify_for_malware_ = should_classify; 509 should_classify_for_malware_ = should_classify;
510 MaybeStartMalwareFeatureExtraction(); 510 MaybeStartMalwareFeatureExtraction();
511 } 511 }
512 512
513 void ClientSideDetectionHost::DidStopLoading(content::RenderViewHost* rvh) { 513 void ClientSideDetectionHost::DidStopLoading() {
514 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); 514 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
515 if (!csd_service_ || !browse_info_.get()) 515 if (!csd_service_ || !browse_info_.get())
516 return; 516 return;
517 DVLOG(2) << "Page finished loading."; 517 DVLOG(2) << "Page finished loading.";
518 pageload_complete_ = true; 518 pageload_complete_ = true;
519 MaybeStartMalwareFeatureExtraction(); 519 MaybeStartMalwareFeatureExtraction();
520 } 520 }
521 521
522 void ClientSideDetectionHost::MaybeStartMalwareFeatureExtraction() { 522 void ClientSideDetectionHost::MaybeStartMalwareFeatureExtraction() {
523 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); 523 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
(...skipping 211 matching lines...) Expand 10 before | Expand all | Expand 10 after
735 ui_manager_->RemoveObserver(this); 735 ui_manager_->RemoveObserver(this);
736 736
737 ui_manager_ = ui_manager; 737 ui_manager_ = ui_manager;
738 if (ui_manager) 738 if (ui_manager)
739 ui_manager_->AddObserver(this); 739 ui_manager_->AddObserver(this);
740 740
741 database_manager_ = database_manager; 741 database_manager_ = database_manager;
742 } 742 }
743 743
744 } // namespace safe_browsing 744 } // namespace safe_browsing
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698