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

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

Issue 8417040: Measure how often downloaded executables match the download whitelist. (Closed) Base URL: http://git.chromium.org/git/chromium.git@trunk
Patch Set: Address Brian's comment. Created 9 years, 1 month 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 79 matching lines...) Expand 10 before | Expand all | Expand 10 after
90 // This is used to keep some stats around. 90 // This is used to keep some stats around.
91 enum DownloadCheckResultReason { 91 enum DownloadCheckResultReason {
92 REASON_INVALID_URL, 92 REASON_INVALID_URL,
93 REASON_SB_DISABLED, 93 REASON_SB_DISABLED,
94 REASON_WHITELISTED_URL, 94 REASON_WHITELISTED_URL,
95 REASON_WHITELISTED_REFERRER, 95 REASON_WHITELISTED_REFERRER,
96 REASON_INVALID_REQUEST_PROTO, 96 REASON_INVALID_REQUEST_PROTO,
97 REASON_SERVER_PING_FAILED, 97 REASON_SERVER_PING_FAILED,
98 REASON_INVALID_RESPONSE_PROTO, 98 REASON_INVALID_RESPONSE_PROTO,
99 REASON_NOT_BINARY_FILE, 99 REASON_NOT_BINARY_FILE,
100 REASON_REQUEST_CANCELED,
100 REASON_MAX // Always add new values before this one. 101 REASON_MAX // Always add new values before this one.
101 }; 102 };
102 103
103 private: 104 private:
104 class CheckClientDownloadRequest; // Per-request state 105 class CheckClientDownloadRequest; // Per-request state
105 friend class DownloadProtectionServiceTest; 106 friend class DownloadProtectionServiceTest;
106 FRIEND_TEST_ALL_PREFIXES(DownloadProtectionServiceTest, 107 FRIEND_TEST_ALL_PREFIXES(DownloadProtectionServiceTest,
107 CheckClientDownloadValidateRequest); 108 CheckClientDownloadValidateRequest);
108 FRIEND_TEST_ALL_PREFIXES(DownloadProtectionServiceTest, 109 FRIEND_TEST_ALL_PREFIXES(DownloadProtectionServiceTest,
109 CheckClientDownloadSuccess); 110 CheckClientDownloadSuccess);
(...skipping 26 matching lines...) Expand all
136 std::set<scoped_refptr<CheckClientDownloadRequest> > download_requests_; 137 std::set<scoped_refptr<CheckClientDownloadRequest> > download_requests_;
137 138
138 // Keeps track of the state of the service. 139 // Keeps track of the state of the service.
139 bool enabled_; 140 bool enabled_;
140 141
141 DISALLOW_COPY_AND_ASSIGN(DownloadProtectionService); 142 DISALLOW_COPY_AND_ASSIGN(DownloadProtectionService);
142 }; 143 };
143 } // namespace safe_browsing 144 } // namespace safe_browsing
144 145
145 #endif // CHROME_BROWSER_SAFE_BROWSING_DOWNLOAD_PROTECTION_SERVICE_H_ 146 #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