| OLD | NEW |
| 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 #include "chrome/browser/safe_browsing/protocol_manager.h" | 5 #include "chrome/browser/safe_browsing/protocol_manager.h" |
| 6 | 6 |
| 7 #include "base/environment.h" | 7 #include "base/environment.h" |
| 8 #include "base/logging.h" | 8 #include "base/logging.h" |
| 9 #include "base/memory/scoped_vector.h" | 9 #include "base/memory/scoped_vector.h" |
| 10 #include "base/metrics/histogram.h" | 10 #include "base/metrics/histogram.h" |
| (...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 69 static const size_t kSbMaxBackOff = 8; | 69 static const size_t kSbMaxBackOff = 8; |
| 70 | 70 |
| 71 // The default SBProtocolManagerFactory. | 71 // The default SBProtocolManagerFactory. |
| 72 class SBProtocolManagerFactoryImpl : public SBProtocolManagerFactory { | 72 class SBProtocolManagerFactoryImpl : public SBProtocolManagerFactory { |
| 73 public: | 73 public: |
| 74 SBProtocolManagerFactoryImpl() { } | 74 SBProtocolManagerFactoryImpl() { } |
| 75 virtual ~SBProtocolManagerFactoryImpl() { } | 75 virtual ~SBProtocolManagerFactoryImpl() { } |
| 76 virtual SafeBrowsingProtocolManager* CreateProtocolManager( | 76 virtual SafeBrowsingProtocolManager* CreateProtocolManager( |
| 77 SafeBrowsingProtocolManagerDelegate* delegate, | 77 SafeBrowsingProtocolManagerDelegate* delegate, |
| 78 net::URLRequestContextGetter* request_context_getter, | 78 net::URLRequestContextGetter* request_context_getter, |
| 79 const SafeBrowsingProtocolConfig& config) OVERRIDE { | 79 const SafeBrowsingProtocolConfig& config) override { |
| 80 return new SafeBrowsingProtocolManager( | 80 return new SafeBrowsingProtocolManager( |
| 81 delegate, request_context_getter, config); | 81 delegate, request_context_getter, config); |
| 82 } | 82 } |
| 83 private: | 83 private: |
| 84 DISALLOW_COPY_AND_ASSIGN(SBProtocolManagerFactoryImpl); | 84 DISALLOW_COPY_AND_ASSIGN(SBProtocolManagerFactoryImpl); |
| 85 }; | 85 }; |
| 86 | 86 |
| 87 // SafeBrowsingProtocolManager implementation ---------------------------------- | 87 // SafeBrowsingProtocolManager implementation ---------------------------------- |
| 88 | 88 |
| 89 // static | 89 // static |
| (...skipping 680 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 770 FullHashCallback callback, bool is_download) | 770 FullHashCallback callback, bool is_download) |
| 771 : callback(callback), | 771 : callback(callback), |
| 772 is_download(is_download) { | 772 is_download(is_download) { |
| 773 } | 773 } |
| 774 | 774 |
| 775 SafeBrowsingProtocolManager::FullHashDetails::~FullHashDetails() { | 775 SafeBrowsingProtocolManager::FullHashDetails::~FullHashDetails() { |
| 776 } | 776 } |
| 777 | 777 |
| 778 SafeBrowsingProtocolManagerDelegate::~SafeBrowsingProtocolManagerDelegate() { | 778 SafeBrowsingProtocolManagerDelegate::~SafeBrowsingProtocolManagerDelegate() { |
| 779 } | 779 } |
| OLD | NEW |