| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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/web_resource/resource_request_allowed_notifier_test_uti
l.h" | 5 #include "chrome/browser/web_resource/resource_request_allowed_notifier_test_uti
l.h" |
| 6 | 6 |
| 7 TestRequestAllowedNotifier::TestRequestAllowedNotifier() | 7 TestRequestAllowedNotifier::TestRequestAllowedNotifier(PrefService* local_state) |
| 8 : override_requests_allowed_(false), | 8 : ResourceRequestAllowedNotifier(local_state), |
| 9 override_requests_allowed_(false), |
| 9 requests_allowed_(true) { | 10 requests_allowed_(true) { |
| 10 } | 11 } |
| 11 | 12 |
| 12 TestRequestAllowedNotifier::~TestRequestAllowedNotifier() { | 13 TestRequestAllowedNotifier::~TestRequestAllowedNotifier() { |
| 13 } | 14 } |
| 14 | 15 |
| 15 void TestRequestAllowedNotifier::InitWithEulaAcceptNotifier( | 16 void TestRequestAllowedNotifier::InitWithEulaAcceptNotifier( |
| 16 Observer* observer, | 17 Observer* observer, |
| 17 scoped_ptr<EulaAcceptedNotifier> eula_notifier) { | 18 scoped_ptr<EulaAcceptedNotifier> eula_notifier) { |
| 18 test_eula_notifier_.swap(eula_notifier); | 19 test_eula_notifier_.swap(eula_notifier); |
| (...skipping 18 matching lines...) Expand all Loading... |
| 37 ResourceRequestAllowedNotifier::State | 38 ResourceRequestAllowedNotifier::State |
| 38 TestRequestAllowedNotifier::GetResourceRequestsAllowedState() { | 39 TestRequestAllowedNotifier::GetResourceRequestsAllowedState() { |
| 39 if (override_requests_allowed_) | 40 if (override_requests_allowed_) |
| 40 return requests_allowed_ ? ALLOWED : DISALLOWED_NETWORK_DOWN; | 41 return requests_allowed_ ? ALLOWED : DISALLOWED_NETWORK_DOWN; |
| 41 return ResourceRequestAllowedNotifier::GetResourceRequestsAllowedState(); | 42 return ResourceRequestAllowedNotifier::GetResourceRequestsAllowedState(); |
| 42 } | 43 } |
| 43 | 44 |
| 44 EulaAcceptedNotifier* TestRequestAllowedNotifier::CreateEulaNotifier() { | 45 EulaAcceptedNotifier* TestRequestAllowedNotifier::CreateEulaNotifier() { |
| 45 return test_eula_notifier_.release(); | 46 return test_eula_notifier_.release(); |
| 46 } | 47 } |
| OLD | NEW |