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

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

Issue 4808003: Fix Valgrind errors that occurred during testing. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Merge. Created 10 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/client_side_detection_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) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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 backends for 5 // Helper class which handles communication with the SafeBrowsing backends for
6 // client-side phishing detection. This class can be used to get a file 6 // client-side phishing detection. This class can be used to get a file
7 // descriptor to the client-side phishing model and also to send a ping back to 7 // descriptor to the client-side phishing model and also to send a ping back to
8 // Google to verify if a particular site is really phishing or not. 8 // Google to verify if a particular site is really phishing or not.
9 // 9 //
10 // This class is not thread-safe and expects all calls to GetModelFile() and 10 // This class is not thread-safe and expects all calls to GetModelFile() and
(...skipping 152 matching lines...) Expand 10 before | Expand all | Expand 10 after
163 void HandlePhishingVerdict(const URLFetcher* source, 163 void HandlePhishingVerdict(const URLFetcher* source,
164 const GURL& url, 164 const GURL& url,
165 const URLRequestStatus& status, 165 const URLRequestStatus& status,
166 int response_code, 166 int response_code,
167 const ResponseCookies& cookies, 167 const ResponseCookies& cookies,
168 const std::string& data); 168 const std::string& data);
169 169
170 FilePath model_path_; 170 FilePath model_path_;
171 ModelStatus model_status_; 171 ModelStatus model_status_;
172 base::PlatformFile model_file_; 172 base::PlatformFile model_file_;
173 scoped_ptr<URLFetcher> model_fetcher_; 173 URLFetcher* model_fetcher_;
174 scoped_ptr<std::string> tmp_model_string_; 174 scoped_ptr<std::string> tmp_model_string_;
175 std::vector<OpenModelDoneCallback*> open_callbacks_; 175 std::vector<OpenModelDoneCallback*> open_callbacks_;
176 176
177 // Map of client report phishing request to the corresponding callback that 177 // Map of client report phishing request to the corresponding callback that
178 // has to be invoked when the request is done. 178 // has to be invoked when the request is done.
179 std::map<const URLFetcher*, ClientReportInfo*> client_phishing_reports_; 179 std::map<const URLFetcher*, ClientReportInfo*> client_phishing_reports_;
180 180
181 // Used to asynchronously call the callbacks for GetModelFile and 181 // Used to asynchronously call the callbacks for GetModelFile and
182 // SendClientReportPhishingRequest. 182 // SendClientReportPhishingRequest.
183 ScopedRunnableMethodFactory<ClientSideDetectionService> method_factory_; 183 ScopedRunnableMethodFactory<ClientSideDetectionService> method_factory_;
184 184
185 // The context we use to issue network requests. 185 // The context we use to issue network requests.
186 scoped_refptr<URLRequestContextGetter> request_context_getter_; 186 scoped_refptr<URLRequestContextGetter> request_context_getter_;
187 187
188 DISALLOW_COPY_AND_ASSIGN(ClientSideDetectionService); 188 DISALLOW_COPY_AND_ASSIGN(ClientSideDetectionService);
189 }; 189 };
190 190
191 } // namepsace safe_browsing 191 } // namepsace safe_browsing
192 192
193 #endif // CHROME_BROWSER_SAFE_BROWSING_CLIENT_SIDE_DETECTION_SERVICE_H_ 193 #endif // CHROME_BROWSER_SAFE_BROWSING_CLIENT_SIDE_DETECTION_SERVICE_H_
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/safe_browsing/client_side_detection_service.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698