OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 306 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
317 } | 317 } |
318 browse_info_.reset(new BrowseInfo); | 318 browse_info_.reset(new BrowseInfo); |
319 | 319 |
320 // Store redirect chain information. | 320 // Store redirect chain information. |
321 if (params.url.host() != cur_host_) { | 321 if (params.url.host() != cur_host_) { |
322 cur_host_ = params.url.host(); | 322 cur_host_ = params.url.host(); |
323 cur_host_redirects_ = params.redirects; | 323 cur_host_redirects_ = params.redirects; |
324 } | 324 } |
325 browse_info_->host_redirects = cur_host_redirects_; | 325 browse_info_->host_redirects = cur_host_redirects_; |
326 browse_info_->url_redirects = params.redirects; | 326 browse_info_->url_redirects = params.redirects; |
| 327 browse_info_->http_status_code = details.http_status_code; |
327 | 328 |
328 // Notify the renderer if it should classify this URL. | 329 // Notify the renderer if it should classify this URL. |
329 classification_request_ = new ShouldClassifyUrlRequest(params, | 330 classification_request_ = new ShouldClassifyUrlRequest(params, |
330 tab_contents(), | 331 tab_contents(), |
331 csd_service_, | 332 csd_service_, |
332 sb_service_, | 333 sb_service_, |
333 this); | 334 this); |
334 classification_request_->Start(); | 335 classification_request_->Start(); |
335 } | 336 } |
336 | 337 |
(...skipping 149 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
486 if (sb_service_) { | 487 if (sb_service_) { |
487 sb_service_->RemoveObserver(this); | 488 sb_service_->RemoveObserver(this); |
488 } | 489 } |
489 sb_service_ = service; | 490 sb_service_ = service; |
490 if (sb_service_) { | 491 if (sb_service_) { |
491 sb_service_->AddObserver(this); | 492 sb_service_->AddObserver(this); |
492 } | 493 } |
493 } | 494 } |
494 | 495 |
495 } // namespace safe_browsing | 496 } // namespace safe_browsing |
OLD | NEW |