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

Side by Side Diff: chrome/browser/safe_browsing/protocol_manager.h

Issue 6935032: Include full redirect chain in downloads safebrowsing ping. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: initialize url_chain in tests 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
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 #ifndef CHROME_BROWSER_SAFE_BROWSING_PROTOCOL_MANAGER_H_ 5 #ifndef CHROME_BROWSER_SAFE_BROWSING_PROTOCOL_MANAGER_H_
6 #define CHROME_BROWSER_SAFE_BROWSING_PROTOCOL_MANAGER_H_ 6 #define CHROME_BROWSER_SAFE_BROWSING_PROTOCOL_MANAGER_H_
7 #pragma once 7 #pragma once
8 8
9 // A class that implements Chrome's interface with the SafeBrowsing protocol. 9 // A class that implements Chrome's interface with the SafeBrowsing protocol.
10 // The SafeBrowsingProtocolManager handles formatting and making requests of, 10 // The SafeBrowsingProtocolManager handles formatting and making requests of,
(...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after
125 // for each list is done. If database_error is true, that means the protocol 125 // for each list is done. If database_error is true, that means the protocol
126 // manager shouldn't fetch updates since they can't be written to disk. It 126 // manager shouldn't fetch updates since they can't be written to disk. It
127 // should try again later to open the database. 127 // should try again later to open the database.
128 void OnGetChunksComplete(const std::vector<SBListChunkRanges>& list, 128 void OnGetChunksComplete(const std::vector<SBListChunkRanges>& list,
129 bool database_error); 129 bool database_error);
130 130
131 // Called after the chunks that were parsed were inserted in the database. 131 // Called after the chunks that were parsed were inserted in the database.
132 void OnChunkInserted(); 132 void OnChunkInserted();
133 133
134 // For UMA users we report to Google when a SafeBrowsing interstitial is shown 134 // For UMA users we report to Google when a SafeBrowsing interstitial is shown
135 // to the user. We assume that the threat type is either URL_MALWARE or 135 // to the user. |threat_type| should be one of the types known by
136 // URL_PHISHING. 136 // SafeBrowsingHitUrl.
137 void ReportSafeBrowsingHit(const GURL& malicious_url, 137 void ReportSafeBrowsingHit(const GURL& malicious_url,
138 const GURL& page_url, 138 const GURL& page_url,
139 const GURL& referrer_url, 139 const GURL& referrer_url,
140 bool is_subresource, 140 bool is_subresource,
141 SafeBrowsingService::UrlCheckResult threat_type); 141 SafeBrowsingService::UrlCheckResult threat_type,
142 const std::string& post_data);
142 143
143 // Users can opt-in on the SafeBrowsing interstitial to send detailed 144 // Users can opt-in on the SafeBrowsing interstitial to send detailed
144 // malware reports. |report| is the serialized report. 145 // malware reports. |report| is the serialized report.
145 void ReportMalwareDetails(const std::string& report); 146 void ReportMalwareDetails(const std::string& report);
146 147
147 bool is_initial_request() const { return initial_request_; } 148 bool is_initial_request() const { return initial_request_; }
148 149
149 // The last time we received an update. 150 // The last time we received an update.
150 base::Time last_update() const { return last_update_; } 151 base::Time last_update() const { return last_update_; }
151 152
(...skipping 254 matching lines...) Expand 10 before | Expand all | Expand 10 after
406 std::string https_url_prefix_; 407 std::string https_url_prefix_;
407 408
408 // When true, protocol manager will not start an update unless 409 // When true, protocol manager will not start an update unless
409 // ForceScheduleNextUpdate() is called. This is set for testing purpose. 410 // ForceScheduleNextUpdate() is called. This is set for testing purpose.
410 bool disable_auto_update_; 411 bool disable_auto_update_;
411 412
412 DISALLOW_COPY_AND_ASSIGN(SafeBrowsingProtocolManager); 413 DISALLOW_COPY_AND_ASSIGN(SafeBrowsingProtocolManager);
413 }; 414 };
414 415
415 #endif // CHROME_BROWSER_SAFE_BROWSING_PROTOCOL_MANAGER_H_ 416 #endif // CHROME_BROWSER_SAFE_BROWSING_PROTOCOL_MANAGER_H_
OLDNEW
« no previous file with comments | « chrome/browser/download/download_safe_browsing_client.cc ('k') | chrome/browser/safe_browsing/protocol_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698