| 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 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 66 // The maximum time, in seconds, to wait for a response to an update request. | 66 // The maximum time, in seconds, to wait for a response to an update request. |
| 67 static const int kSbMaxUpdateWaitSec = 30; | 67 static const int kSbMaxUpdateWaitSec = 30; |
| 68 | 68 |
| 69 // Maximum back off multiplier. | 69 // Maximum back off multiplier. |
| 70 static const size_t kSbMaxBackOff = 8; | 70 static const size_t kSbMaxBackOff = 8; |
| 71 | 71 |
| 72 // The default SBProtocolManagerFactory. | 72 // The default SBProtocolManagerFactory. |
| 73 class SBProtocolManagerFactoryImpl : public SBProtocolManagerFactory { | 73 class SBProtocolManagerFactoryImpl : public SBProtocolManagerFactory { |
| 74 public: | 74 public: |
| 75 SBProtocolManagerFactoryImpl() { } | 75 SBProtocolManagerFactoryImpl() { } |
| 76 virtual ~SBProtocolManagerFactoryImpl() { } | 76 ~SBProtocolManagerFactoryImpl() override {} |
| 77 virtual SafeBrowsingProtocolManager* CreateProtocolManager( | 77 SafeBrowsingProtocolManager* CreateProtocolManager( |
| 78 SafeBrowsingProtocolManagerDelegate* delegate, | 78 SafeBrowsingProtocolManagerDelegate* delegate, |
| 79 net::URLRequestContextGetter* request_context_getter, | 79 net::URLRequestContextGetter* request_context_getter, |
| 80 const SafeBrowsingProtocolConfig& config) override { | 80 const SafeBrowsingProtocolConfig& config) override { |
| 81 return new SafeBrowsingProtocolManager( | 81 return new SafeBrowsingProtocolManager( |
| 82 delegate, request_context_getter, config); | 82 delegate, request_context_getter, config); |
| 83 } | 83 } |
| 84 private: | 84 private: |
| 85 DISALLOW_COPY_AND_ASSIGN(SBProtocolManagerFactoryImpl); | 85 DISALLOW_COPY_AND_ASSIGN(SBProtocolManagerFactoryImpl); |
| 86 }; | 86 }; |
| 87 | 87 |
| (...skipping 688 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 776 FullHashCallback callback, bool is_download) | 776 FullHashCallback callback, bool is_download) |
| 777 : callback(callback), | 777 : callback(callback), |
| 778 is_download(is_download) { | 778 is_download(is_download) { |
| 779 } | 779 } |
| 780 | 780 |
| 781 SafeBrowsingProtocolManager::FullHashDetails::~FullHashDetails() { | 781 SafeBrowsingProtocolManager::FullHashDetails::~FullHashDetails() { |
| 782 } | 782 } |
| 783 | 783 |
| 784 SafeBrowsingProtocolManagerDelegate::~SafeBrowsingProtocolManagerDelegate() { | 784 SafeBrowsingProtocolManagerDelegate::~SafeBrowsingProtocolManagerDelegate() { |
| 785 } | 785 } |
| OLD | NEW |