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

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

Issue 23625015: Consolidate TestURLFetcherFactory::SetFakeResponse (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase. Created 7 years, 2 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) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 10
(...skipping 153 matching lines...) Expand 10 before | Expand all | Expand 10 after
164 164
165 // Given a certificate and its immediate issuer certificate, generates the 165 // Given a certificate and its immediate issuer certificate, generates the
166 // list of strings that need to be checked against the download whitelist to 166 // list of strings that need to be checked against the download whitelist to
167 // determine whether the certificate is whitelisted. 167 // determine whether the certificate is whitelisted.
168 static void GetCertificateWhitelistStrings( 168 static void GetCertificateWhitelistStrings(
169 const net::X509Certificate& certificate, 169 const net::X509Certificate& certificate,
170 const net::X509Certificate& issuer, 170 const net::X509Certificate& issuer,
171 std::vector<std::string>* whitelist_strings); 171 std::vector<std::string>* whitelist_strings);
172 172
173 // Returns the URL that will be used for download requests. 173 // Returns the URL that will be used for download requests.
174 static std::string GetDownloadRequestUrl(); 174 static GURL GetDownloadRequestUrl();
175 175
176 // These pointers may be NULL if SafeBrowsing is disabled. 176 // These pointers may be NULL if SafeBrowsing is disabled.
177 scoped_refptr<SafeBrowsingUIManager> ui_manager_; 177 scoped_refptr<SafeBrowsingUIManager> ui_manager_;
178 scoped_refptr<SafeBrowsingDatabaseManager> database_manager_; 178 scoped_refptr<SafeBrowsingDatabaseManager> database_manager_;
179 179
180 // The context we use to issue network requests. 180 // The context we use to issue network requests.
181 scoped_refptr<net::URLRequestContextGetter> request_context_getter_; 181 scoped_refptr<net::URLRequestContextGetter> request_context_getter_;
182 182
183 // Map of client download request to the corresponding callback that 183 // Map of client download request to the corresponding callback that
184 // has to be invoked when the request is done. This map contains all 184 // has to be invoked when the request is done. This map contains all
185 // pending server requests. 185 // pending server requests.
186 std::set<scoped_refptr<CheckClientDownloadRequest> > download_requests_; 186 std::set<scoped_refptr<CheckClientDownloadRequest> > download_requests_;
187 187
188 // Keeps track of the state of the service. 188 // Keeps track of the state of the service.
189 bool enabled_; 189 bool enabled_;
190 190
191 // SignatureUtil object, may be overridden for testing. 191 // SignatureUtil object, may be overridden for testing.
192 scoped_refptr<SignatureUtil> signature_util_; 192 scoped_refptr<SignatureUtil> signature_util_;
193 193
194 int64 download_request_timeout_ms_; 194 int64 download_request_timeout_ms_;
195 195
196 scoped_ptr<DownloadFeedbackService> feedback_service_; 196 scoped_ptr<DownloadFeedbackService> feedback_service_;
197 197
198 DISALLOW_COPY_AND_ASSIGN(DownloadProtectionService); 198 DISALLOW_COPY_AND_ASSIGN(DownloadProtectionService);
199 }; 199 };
200 } // namespace safe_browsing 200 } // namespace safe_browsing
201 201
202 #endif // CHROME_BROWSER_SAFE_BROWSING_DOWNLOAD_PROTECTION_SERVICE_H_ 202 #endif // CHROME_BROWSER_SAFE_BROWSING_DOWNLOAD_PROTECTION_SERVICE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698