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

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

Issue 570713007: Fix WeakPtrFactory member ordering in chrome/browser/safe_browsing (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 3 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
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 backends for 5 // Helper class which handles communication with the SafeBrowsing backends for
6 // client-side phishing detection. This class is used to fetch the client-side 6 // client-side phishing detection. This class is used to fetch the client-side
7 // model and send it to all renderers. This class is also used to send a ping 7 // model and send it to all renderers. This class is also used to send a ping
8 // back to Google to verify if a particular site is really phishing or not. 8 // back to 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 be made on the UI 10 // This class is not thread-safe and expects all calls to be made on the UI
(...skipping 298 matching lines...) Expand 10 before | Expand all | Expand 10 after
309 309
310 // Timestamp of when we sent a phishing request. Used to limit the number 310 // Timestamp of when we sent a phishing request. Used to limit the number
311 // of phishing requests that we send in a day. 311 // of phishing requests that we send in a day.
312 // TODO(gcasto): Serialize this so that it doesn't reset on browser restart. 312 // TODO(gcasto): Serialize this so that it doesn't reset on browser restart.
313 std::queue<base::Time> phishing_report_times_; 313 std::queue<base::Time> phishing_report_times_;
314 314
315 // Timestamp of when we sent a malware request. Used to limit the number 315 // Timestamp of when we sent a malware request. Used to limit the number
316 // of malware requests that we send in a day. 316 // of malware requests that we send in a day.
317 std::queue<base::Time> malware_report_times_; 317 std::queue<base::Time> malware_report_times_;
318 318
319 // Used to asynchronously call the callbacks for
320 // SendClientReportPhishingRequest.
321 base::WeakPtrFactory<ClientSideDetectionService> weak_factory_;
322
323 // The context we use to issue network requests. 319 // The context we use to issue network requests.
324 scoped_refptr<net::URLRequestContextGetter> request_context_getter_; 320 scoped_refptr<net::URLRequestContextGetter> request_context_getter_;
325 321
326 // Map of bad subnets which are copied from the client model and put into 322 // Map of bad subnets which are copied from the client model and put into
327 // this map to speed up lookups. 323 // this map to speed up lookups.
328 BadSubnetMap bad_subnets_; 324 BadSubnetMap bad_subnets_;
329 325
330 content::NotificationRegistrar registrar_; 326 content::NotificationRegistrar registrar_;
331 327
328 // Used to asynchronously call the callbacks for
329 // SendClientReportPhishingRequest.
330 base::WeakPtrFactory<ClientSideDetectionService> weak_factory_;
331
332 DISALLOW_COPY_AND_ASSIGN(ClientSideDetectionService); 332 DISALLOW_COPY_AND_ASSIGN(ClientSideDetectionService);
333 }; 333 };
334 } // namespace safe_browsing 334 } // namespace safe_browsing
335 335
336 #endif // CHROME_BROWSER_SAFE_BROWSING_CLIENT_SIDE_DETECTION_SERVICE_H_ 336 #endif // CHROME_BROWSER_SAFE_BROWSING_CLIENT_SIDE_DETECTION_SERVICE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698