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/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 375 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
386 // Store redirect chain information. | 386 // Store redirect chain information. |
387 if (params.url.host() != cur_host_) { | 387 if (params.url.host() != cur_host_) { |
388 cur_host_ = params.url.host(); | 388 cur_host_ = params.url.host(); |
389 cur_host_redirects_ = params.redirects; | 389 cur_host_redirects_ = params.redirects; |
390 } | 390 } |
391 browse_info_->url = params.url; | 391 browse_info_->url = params.url; |
392 browse_info_->host_redirects = cur_host_redirects_; | 392 browse_info_->host_redirects = cur_host_redirects_; |
393 browse_info_->url_redirects = params.redirects; | 393 browse_info_->url_redirects = params.redirects; |
394 browse_info_->referrer = params.referrer.url; | 394 browse_info_->referrer = params.referrer.url; |
395 browse_info_->http_status_code = details.http_status_code; | 395 browse_info_->http_status_code = details.http_status_code; |
396 browse_info_->page_id = params.page_id; | 396 browse_info_->page_id = details.entry->GetPageID(); |
397 | 397 |
398 should_extract_malware_features_ = true; | 398 should_extract_malware_features_ = true; |
399 should_classify_for_malware_ = false; | 399 should_classify_for_malware_ = false; |
400 pageload_complete_ = false; | 400 pageload_complete_ = false; |
401 | 401 |
402 // Check whether we can cassify the current URL for phishing or malware. | 402 // Check whether we can cassify the current URL for phishing or malware. |
403 classification_request_ = new ShouldClassifyUrlRequest( | 403 classification_request_ = new ShouldClassifyUrlRequest( |
404 params, | 404 params, |
405 base::Bind(&ClientSideDetectionHost::OnPhishingPreClassificationDone, | 405 base::Bind(&ClientSideDetectionHost::OnPhishingPreClassificationDone, |
406 weak_factory_.GetWeakPtr()), | 406 weak_factory_.GetWeakPtr()), |
(...skipping 329 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
736 ui_manager_->RemoveObserver(this); | 736 ui_manager_->RemoveObserver(this); |
737 | 737 |
738 ui_manager_ = ui_manager; | 738 ui_manager_ = ui_manager; |
739 if (ui_manager) | 739 if (ui_manager) |
740 ui_manager_->AddObserver(this); | 740 ui_manager_->AddObserver(this); |
741 | 741 |
742 database_manager_ = database_manager; | 742 database_manager_ = database_manager; |
743 } | 743 } |
744 | 744 |
745 } // namespace safe_browsing | 745 } // namespace safe_browsing |
OLD | NEW |