| 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 // Implementation of the ThreatDetails class. | 5 // Implementation of the ThreatDetails class. |
| 6 | 6 |
| 7 #include "chrome/browser/safe_browsing/threat_details.h" | 7 #include "chrome/browser/safe_browsing/threat_details.h" |
| 8 | 8 |
| 9 #include <stddef.h> | 9 #include <stddef.h> |
| 10 #include <stdint.h> | 10 #include <stdint.h> |
| 11 #include <unordered_set> | 11 #include <unordered_set> |
| 12 | 12 |
| 13 #include "base/bind.h" | 13 #include "base/bind.h" |
| 14 #include "base/lazy_instance.h" | 14 #include "base/lazy_instance.h" |
| 15 #include "base/macros.h" | 15 #include "base/macros.h" |
| 16 #include "base/strings/string_util.h" | 16 #include "base/strings/string_util.h" |
| 17 #include "chrome/browser/profiles/profile.h" | 17 #include "chrome/browser/profiles/profile.h" |
| 18 #include "chrome/browser/safe_browsing/threat_details_cache.h" | 18 #include "chrome/browser/safe_browsing/threat_details_cache.h" |
| 19 #include "chrome/browser/safe_browsing/threat_details_history.h" | 19 #include "chrome/browser/safe_browsing/threat_details_history.h" |
| 20 #include "chrome/common/safe_browsing/safebrowsing_messages.h" | 20 #include "components/safe_browsing/common/safebrowsing_messages.h" |
| 21 #include "content/public/browser/browser_thread.h" | 21 #include "content/public/browser/browser_thread.h" |
| 22 #include "content/public/browser/navigation_controller.h" | 22 #include "content/public/browser/navigation_controller.h" |
| 23 #include "content/public/browser/navigation_entry.h" | 23 #include "content/public/browser/navigation_entry.h" |
| 24 #include "content/public/browser/render_frame_host.h" | 24 #include "content/public/browser/render_frame_host.h" |
| 25 #include "content/public/browser/web_contents.h" | 25 #include "content/public/browser/web_contents.h" |
| 26 #include "net/url_request/url_request_context_getter.h" | 26 #include "net/url_request/url_request_context_getter.h" |
| 27 | 27 |
| 28 using content::BrowserThread; | 28 using content::BrowserThread; |
| 29 using content::NavigationEntry; | 29 using content::NavigationEntry; |
| 30 using content::RenderFrameHost; | 30 using content::RenderFrameHost; |
| (...skipping 381 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 412 // Send the report, using the SafeBrowsingService. | 412 // Send the report, using the SafeBrowsingService. |
| 413 std::string serialized; | 413 std::string serialized; |
| 414 if (!report_->SerializeToString(&serialized)) { | 414 if (!report_->SerializeToString(&serialized)) { |
| 415 DLOG(ERROR) << "Unable to serialize the threat report."; | 415 DLOG(ERROR) << "Unable to serialize the threat report."; |
| 416 return; | 416 return; |
| 417 } | 417 } |
| 418 ui_manager_->SendSerializedThreatDetails(serialized); | 418 ui_manager_->SendSerializedThreatDetails(serialized); |
| 419 } | 419 } |
| 420 | 420 |
| 421 } // namespace safe_browsing | 421 } // namespace safe_browsing |
| OLD | NEW |