| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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 "components/data_reduction_proxy/core/common/data_reduction_proxy_event
_storage_delegate_test_utils.h" | 5 #include "components/data_reduction_proxy/core/common/data_reduction_proxy_event
_storage_delegate_test_utils.h" |
| 6 | 6 |
| 7 #include "base/basictypes.h" | |
| 8 #include "base/memory/scoped_ptr.h" | 7 #include "base/memory/scoped_ptr.h" |
| 9 #include "base/values.h" | 8 #include "base/values.h" |
| 10 #include "components/data_reduction_proxy/core/common/data_reduction_proxy_event
_storage_delegate.h" | 9 #include "components/data_reduction_proxy/core/common/data_reduction_proxy_event
_storage_delegate.h" |
| 11 | 10 |
| 12 namespace data_reduction_proxy { | 11 namespace data_reduction_proxy { |
| 13 | 12 |
| 14 TestDataReductionProxyEventStorageDelegate:: | 13 TestDataReductionProxyEventStorageDelegate:: |
| 15 TestDataReductionProxyEventStorageDelegate() | 14 TestDataReductionProxyEventStorageDelegate() |
| 16 : delegate_(nullptr) { | 15 : delegate_(nullptr) { |
| 17 } | 16 } |
| (...skipping 15 matching lines...) Expand all Loading... |
| 33 | 32 |
| 34 void TestDataReductionProxyEventStorageDelegate::AddEnabledEvent( | 33 void TestDataReductionProxyEventStorageDelegate::AddEnabledEvent( |
| 35 scoped_ptr<base::Value> event, | 34 scoped_ptr<base::Value> event, |
| 36 bool enabled) { | 35 bool enabled) { |
| 37 if (delegate_) | 36 if (delegate_) |
| 38 delegate_->AddEnabledEvent(event.Pass(), enabled); | 37 delegate_->AddEnabledEvent(event.Pass(), enabled); |
| 39 } | 38 } |
| 40 | 39 |
| 41 void TestDataReductionProxyEventStorageDelegate::AddAndSetLastBypassEvent( | 40 void TestDataReductionProxyEventStorageDelegate::AddAndSetLastBypassEvent( |
| 42 scoped_ptr<base::Value> event, | 41 scoped_ptr<base::Value> event, |
| 43 int64 expiration_ticks) { | 42 int64_t expiration_ticks) { |
| 44 if (delegate_) | 43 if (delegate_) |
| 45 delegate_->AddAndSetLastBypassEvent(event.Pass(), expiration_ticks); | 44 delegate_->AddAndSetLastBypassEvent(event.Pass(), expiration_ticks); |
| 46 } | 45 } |
| 47 | 46 |
| 48 void TestDataReductionProxyEventStorageDelegate:: | 47 void TestDataReductionProxyEventStorageDelegate:: |
| 49 AddEventAndSecureProxyCheckState(scoped_ptr<base::Value> event, | 48 AddEventAndSecureProxyCheckState(scoped_ptr<base::Value> event, |
| 50 SecureProxyCheckState state) { | 49 SecureProxyCheckState state) { |
| 51 if (delegate_) | 50 if (delegate_) |
| 52 delegate_->AddEventAndSecureProxyCheckState(event.Pass(), state); | 51 delegate_->AddEventAndSecureProxyCheckState(event.Pass(), state); |
| 53 } | 52 } |
| 54 | 53 |
| 55 } // namespace data_reduction_proxy | 54 } // namespace data_reduction_proxy |
| OLD | NEW |