| 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/loader/safe_browsing_resource_throttle.h" | 5 #include "chrome/browser/loader/safe_browsing_resource_throttle.h" |
| 6 | 6 |
| 7 #include <iterator> | 7 #include <iterator> |
| 8 #include <utility> | 8 #include <utility> |
| 9 | 9 |
| 10 #include "base/debug/alias.h" | 10 #include "base/debug/alias.h" |
| (...skipping 224 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 235 CHECK_EQ(state_, STATE_CHECKING_URL); | 235 CHECK_EQ(state_, STATE_CHECKING_URL); |
| 236 // TODO(vakh): The following base::debug::Alias() and CHECK calls should be | 236 // TODO(vakh): The following base::debug::Alias() and CHECK calls should be |
| 237 // removed after http://crbug.com/660293 is fixed. | 237 // removed after http://crbug.com/660293 is fixed. |
| 238 CHECK(url.is_valid()); | 238 CHECK(url.is_valid()); |
| 239 CHECK(url_being_checked_.is_valid()); | 239 CHECK(url_being_checked_.is_valid()); |
| 240 if (url != url_being_checked_) { | 240 if (url != url_being_checked_) { |
| 241 char buf[2000]; | 241 char buf[2000]; |
| 242 snprintf(buf, sizeof(buf), "sbtr::ocbur:%s -- %s\n", url.spec().c_str(), | 242 snprintf(buf, sizeof(buf), "sbtr::ocbur:%s -- %s\n", url.spec().c_str(), |
| 243 url_being_checked_.spec().c_str()); | 243 url_being_checked_.spec().c_str()); |
| 244 base::debug::Alias(buf); | 244 base::debug::Alias(buf); |
| 245 CHECK(false) << "buf: " << buf; | 245 CHECK(false); |
| 246 } | 246 } |
| 247 | 247 |
| 248 timer_.Stop(); // Cancel the timeout timer. | 248 timer_.Stop(); // Cancel the timeout timer. |
| 249 threat_type_ = threat_type; | 249 threat_type_ = threat_type; |
| 250 state_ = STATE_NONE; | 250 state_ = STATE_NONE; |
| 251 | 251 |
| 252 if (defer_state_ != DEFERRED_NONE) { | 252 if (defer_state_ != DEFERRED_NONE) { |
| 253 EndNetLogEvent(NetLogEventType::SAFE_BROWSING_DEFERRED, nullptr, nullptr); | 253 EndNetLogEvent(NetLogEventType::SAFE_BROWSING_DEFERRED, nullptr, nullptr); |
| 254 } | 254 } |
| 255 EndNetLogEvent( | 255 EndNetLogEvent( |
| (...skipping 177 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 433 unchecked_redirect_url_, "defer_reason", | 433 unchecked_redirect_url_, "defer_reason", |
| 434 "resumed_redirect"); | 434 "resumed_redirect"); |
| 435 } | 435 } |
| 436 } | 436 } |
| 437 | 437 |
| 438 if (resume) { | 438 if (resume) { |
| 439 defer_state_ = DEFERRED_NONE; | 439 defer_state_ = DEFERRED_NONE; |
| 440 Resume(); | 440 Resume(); |
| 441 } | 441 } |
| 442 } | 442 } |
| OLD | NEW |