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

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

Issue 8790006: Add download server IP address to the SafeBrowsing download protection ping. (Closed) Base URL: http://git.chromium.org/git/chromium.git@trunk
Patch Set: Created 9 years 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
« no previous file with comments | « no previous file | chrome/browser/safe_browsing/download_protection_service.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 // Helper class which handles communication with the SafeBrowsing servers for 5 // Helper class which handles communication with the SafeBrowsing servers for
6 // improved binary download protection. 6 // improved binary download protection.
7 7
8 #ifndef CHROME_BROWSER_SAFE_BROWSING_DOWNLOAD_PROTECTION_SERVICE_H_ 8 #ifndef CHROME_BROWSER_SAFE_BROWSING_DOWNLOAD_PROTECTION_SERVICE_H_
9 #define CHROME_BROWSER_SAFE_BROWSING_DOWNLOAD_PROTECTION_SERVICE_H_ 9 #define CHROME_BROWSER_SAFE_BROWSING_DOWNLOAD_PROTECTION_SERVICE_H_
10 #pragma once 10 #pragma once
(...skipping 27 matching lines...) Expand all
38 // TODO(noelutz): we're missing some fields here: server IPs, 38 // TODO(noelutz): we're missing some fields here: server IPs,
39 // tab URL redirect chain, ... 39 // tab URL redirect chain, ...
40 struct DownloadInfo { 40 struct DownloadInfo {
41 FilePath local_file; // Where the download is currently stored. 41 FilePath local_file; // Where the download is currently stored.
42 FilePath target_file; // Where the download will eventually be stored. 42 FilePath target_file; // Where the download will eventually be stored.
43 std::vector<GURL> download_url_chain; 43 std::vector<GURL> download_url_chain;
44 GURL referrer_url; 44 GURL referrer_url;
45 std::string sha256_hash; 45 std::string sha256_hash;
46 int64 total_bytes; 46 int64 total_bytes;
47 bool user_initiated; 47 bool user_initiated;
48 std::string remote_address;
48 DownloadInfo(); 49 DownloadInfo();
49 ~DownloadInfo(); 50 ~DownloadInfo();
50 std::string DebugString() const; 51 std::string DebugString() const;
51 // Creates a DownloadInfo from a DownloadItem object. 52 // Creates a DownloadInfo from a DownloadItem object.
52 static DownloadInfo FromDownloadItem(const DownloadItem& item); 53 static DownloadInfo FromDownloadItem(const DownloadItem& item);
53 }; 54 };
54 55
55 enum DownloadCheckResult { 56 enum DownloadCheckResult {
56 SAFE, 57 SAFE,
57 DANGEROUS, 58 DANGEROUS,
(...skipping 122 matching lines...) Expand 10 before | Expand all | Expand 10 after
180 // SignatureUtil object, may be overridden for testing. 181 // SignatureUtil object, may be overridden for testing.
181 scoped_refptr<SignatureUtil> signature_util_; 182 scoped_refptr<SignatureUtil> signature_util_;
182 183
183 int64 download_request_timeout_ms_; 184 int64 download_request_timeout_ms_;
184 185
185 DISALLOW_COPY_AND_ASSIGN(DownloadProtectionService); 186 DISALLOW_COPY_AND_ASSIGN(DownloadProtectionService);
186 }; 187 };
187 } // namespace safe_browsing 188 } // namespace safe_browsing
188 189
189 #endif // CHROME_BROWSER_SAFE_BROWSING_DOWNLOAD_PROTECTION_SERVICE_H_ 190 #endif // CHROME_BROWSER_SAFE_BROWSING_DOWNLOAD_PROTECTION_SERVICE_H_
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/safe_browsing/download_protection_service.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698