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

Unified Diff: chrome/browser/safe_browsing/malware_details_cache.cc

Issue 6880285: SafeBrowsing Opt-in Malware Reports: Collect remote ip:port pairs for requests that were not fetc... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 9 years, 7 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/safe_browsing/malware_details_cache.cc
===================================================================
--- chrome/browser/safe_browsing/malware_details_cache.cc (revision 84780)
+++ chrome/browser/safe_browsing/malware_details_cache.cc (working copy)
@@ -15,6 +15,7 @@
#include "chrome/browser/safe_browsing/safe_browsing_service.h"
#include "chrome/browser/safe_browsing/report.pb.h"
#include "content/browser/browser_thread.h"
+#include "net/base/host_port_pair.h"
#include "net/base/load_flags.h"
#include "net/http/http_response_headers.h"
#include "net/url_request/url_request_context_getter.h"
@@ -165,6 +166,11 @@
pb_header->set_value(value);
}
}
+
+ net::HostPortPair socket_address = source->socket_address();
mattm 2011/05/10 21:26:30 Could go in the if block, or just do it inline in
panayiotis 2011/05/10 21:47:36 Done.
+ if (!source->was_fetched_via_proxy()) {
+ pb_response->set_remote_ip(socket_address.ToString());
mattm 2011/05/10 21:26:30 Can the test be updated to check this?
panayiotis 2011/05/10 21:47:36 Done.
+ }
}
void MalwareDetailsCacheCollector::ReadData(
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698