| OLD | NEW | 
|---|
| 1 // Copyright (c) 2011 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 | 
| 11 // thread.  We also expect that the calling thread runs a message loop. | 11 // thread.  We also expect that the calling thread runs a message loop. | 
| 12 | 12 | 
| 13 #ifndef CHROME_BROWSER_SAFE_BROWSING_CLIENT_SIDE_DETECTION_SERVICE_H_ | 13 #ifndef CHROME_BROWSER_SAFE_BROWSING_CLIENT_SIDE_DETECTION_SERVICE_H_ | 
| 14 #define CHROME_BROWSER_SAFE_BROWSING_CLIENT_SIDE_DETECTION_SERVICE_H_ | 14 #define CHROME_BROWSER_SAFE_BROWSING_CLIENT_SIDE_DETECTION_SERVICE_H_ | 
| 15 #pragma once | 15 #pragma once | 
| 16 | 16 | 
| 17 #include <map> | 17 #include <map> | 
| 18 #include <queue> | 18 #include <queue> | 
| 19 #include <set> | 19 #include <set> | 
| 20 #include <string> | 20 #include <string> | 
| 21 #include <utility> | 21 #include <utility> | 
| 22 #include <vector> | 22 #include <vector> | 
| 23 | 23 | 
| 24 #include "base/basictypes.h" | 24 #include "base/basictypes.h" | 
| 25 #include "base/callback_old.h" |  | 
| 26 #include "base/gtest_prod_util.h" | 25 #include "base/gtest_prod_util.h" | 
| 27 #include "base/memory/linked_ptr.h" | 26 #include "base/memory/linked_ptr.h" | 
| 28 #include "base/memory/ref_counted.h" | 27 #include "base/memory/ref_counted.h" | 
| 29 #include "base/memory/scoped_ptr.h" | 28 #include "base/memory/scoped_ptr.h" | 
| 30 #include "base/task.h" | 29 #include "base/task.h" | 
| 31 #include "base/time.h" | 30 #include "base/time.h" | 
| 32 #include "content/public/common/url_fetcher_delegate.h" | 31 #include "content/public/common/url_fetcher_delegate.h" | 
| 33 #include "content/public/browser/notification_observer.h" | 32 #include "content/public/browser/notification_observer.h" | 
| 34 #include "content/public/browser/notification_registrar.h" | 33 #include "content/public/browser/notification_registrar.h" | 
| 35 #include "googleurl/src/gurl.h" | 34 #include "googleurl/src/gurl.h" | 
| (...skipping 257 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 293   // this map to speed up lookups. | 292   // this map to speed up lookups. | 
| 294   BadSubnetMap bad_subnets_; | 293   BadSubnetMap bad_subnets_; | 
| 295 | 294 | 
| 296   content::NotificationRegistrar registrar_; | 295   content::NotificationRegistrar registrar_; | 
| 297 | 296 | 
| 298   DISALLOW_COPY_AND_ASSIGN(ClientSideDetectionService); | 297   DISALLOW_COPY_AND_ASSIGN(ClientSideDetectionService); | 
| 299 }; | 298 }; | 
| 300 }  // namepsace safe_browsing | 299 }  // namepsace safe_browsing | 
| 301 | 300 | 
| 302 #endif  // CHROME_BROWSER_SAFE_BROWSING_CLIENT_SIDE_DETECTION_SERVICE_H_ | 301 #endif  // CHROME_BROWSER_SAFE_BROWSING_CLIENT_SIDE_DETECTION_SERVICE_H_ | 
| OLD | NEW | 
|---|