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

Unified Diff: chrome/browser/renderer_host/safe_browsing_resource_throttle.cc

Issue 1726403006: Switch Safe Browsing's metadata from string to struct. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix ParseJson in test Created 4 years, 10 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/renderer_host/safe_browsing_resource_throttle.cc
diff --git a/chrome/browser/renderer_host/safe_browsing_resource_throttle.cc b/chrome/browser/renderer_host/safe_browsing_resource_throttle.cc
index 9ed2c9591a0b4da595ac0a4462b3b4dd77fdac5c..891ee982b500dbd4e253a9f7905b9824b02d2fe7 100644
--- a/chrome/browser/renderer_host/safe_browsing_resource_throttle.cc
+++ b/chrome/browser/renderer_host/safe_browsing_resource_throttle.cc
@@ -13,6 +13,7 @@
#include "chrome/browser/browser_process.h"
#include "chrome/browser/prerender/prerender_contents.h"
#include "chrome/browser/safe_browsing/safe_browsing_service.h"
+#include "components/safe_browsing_db/util.h"
#include "content/public/browser/browser_thread.h"
#include "content/public/browser/render_frame_host.h"
#include "content/public/browser/resource_controller.h"
@@ -206,7 +207,7 @@ const char* SafeBrowsingResourceThrottle::GetNameForLogging() const {
void SafeBrowsingResourceThrottle::OnCheckBrowseUrlResult(
const GURL& url,
safe_browsing::SBThreatType threat_type,
- const std::string& metadata) {
+ const safe_browsing::ThreatMetadata& metadata) {
CHECK_EQ(state_, STATE_CHECKING_URL);
CHECK_EQ(url, url_being_checked_);
@@ -363,8 +364,8 @@ void SafeBrowsingResourceThrottle::OnCheckUrlTimeout() {
CHECK_EQ(state_, STATE_CHECKING_URL);
database_manager_->CancelCheck(this);
- OnCheckBrowseUrlResult(
- url_being_checked_, safe_browsing::SB_THREAT_TYPE_SAFE, std::string());
+ OnCheckBrowseUrlResult(url_being_checked_, safe_browsing::SB_THREAT_TYPE_SAFE,
+ safe_browsing::ThreatMetadata());
}
void SafeBrowsingResourceThrottle::ResumeRequest() {
« no previous file with comments | « chrome/browser/renderer_host/safe_browsing_resource_throttle.h ('k') | chrome/browser/safe_browsing/local_database_manager.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698