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

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

Issue 8438012: Parse the download server response. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: 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
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 80 matching lines...) Expand 10 before | Expand all | Expand 10 after
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_REQUEST_CANCELED,
101 REASON_DOWNLOAD_MALICIOUS,
102 REASON_DOWNLOAD_SAFE,
101 REASON_MAX // Always add new values before this one. 103 REASON_MAX // Always add new values before this one.
102 }; 104 };
103 105
104 private: 106 private:
105 class CheckClientDownloadRequest; // Per-request state 107 class CheckClientDownloadRequest; // Per-request state
106 friend class DownloadProtectionServiceTest; 108 friend class DownloadProtectionServiceTest;
107 FRIEND_TEST_ALL_PREFIXES(DownloadProtectionServiceTest, 109 FRIEND_TEST_ALL_PREFIXES(DownloadProtectionServiceTest,
108 CheckClientDownloadValidateRequest); 110 CheckClientDownloadValidateRequest);
109 FRIEND_TEST_ALL_PREFIXES(DownloadProtectionServiceTest, 111 FRIEND_TEST_ALL_PREFIXES(DownloadProtectionServiceTest,
110 CheckClientDownloadSuccess); 112 CheckClientDownloadSuccess);
(...skipping 26 matching lines...) Expand all
137 std::set<scoped_refptr<CheckClientDownloadRequest> > download_requests_; 139 std::set<scoped_refptr<CheckClientDownloadRequest> > download_requests_;
138 140
139 // Keeps track of the state of the service. 141 // Keeps track of the state of the service.
140 bool enabled_; 142 bool enabled_;
141 143
142 DISALLOW_COPY_AND_ASSIGN(DownloadProtectionService); 144 DISALLOW_COPY_AND_ASSIGN(DownloadProtectionService);
143 }; 145 };
144 } // namespace safe_browsing 146 } // namespace safe_browsing
145 147
146 #endif // CHROME_BROWSER_SAFE_BROWSING_DOWNLOAD_PROTECTION_SERVICE_H_ 148 #endif // CHROME_BROWSER_SAFE_BROWSING_DOWNLOAD_PROTECTION_SERVICE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698