| Index: chrome/browser/metrics/variations/resource_request_allowed_notifier_test_util.cc
|
| diff --git a/chrome/browser/metrics/variations/resource_request_allowed_notifier_test_util.cc b/chrome/browser/metrics/variations/resource_request_allowed_notifier_test_util.cc
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..87c7e72a3a7725757b769bb294081fc8fcd10a28
|
| --- /dev/null
|
| +++ b/chrome/browser/metrics/variations/resource_request_allowed_notifier_test_util.cc
|
| @@ -0,0 +1,47 @@
|
| +// Copyright (c) 2012 The Chromium Authors. All rights reserved.
|
| +// Use of this source code is governed by a BSD-style license that can be
|
| +// found in the LICENSE file.
|
| +
|
| +#include "chrome/browser/metrics/variations/resource_request_allowed_notifier_test_util.h"
|
| +
|
| +TestRequestAllowedNotifier::TestRequestAllowedNotifier()
|
| + : requests_allowed_(true),
|
| +#if defined(OS_CHROMEOS)
|
| + eula_accepted_(false),
|
| +#endif
|
| + override_requests_allowed_(true) {
|
| +}
|
| +
|
| +TestRequestAllowedNotifier::~TestRequestAllowedNotifier() {
|
| +}
|
| +
|
| +#if defined(OS_CHROMEOS)
|
| +void TestRequestAllowedNotifier::SetEulaAccepted(bool accepted) {
|
| + eula_accepted_ = accepted;
|
| +}
|
| +#endif
|
| +
|
| +void TestRequestAllowedNotifier::SetRequestsAllowed(bool allowed) {
|
| + requests_allowed_ = allowed;
|
| +}
|
| +
|
| +void TestRequestAllowedNotifier::OverrideRequestsAllowed(bool override) {
|
| + override_requests_allowed_ = override;
|
| +}
|
| +
|
| +void TestRequestAllowedNotifier::NotifyObservers() {
|
| + requests_allowed_ = true;
|
| + MaybeNotifyObservers();
|
| +}
|
| +
|
| +#if defined(OS_CHROMEOS)
|
| +bool TestRequestAllowedNotifier::IsEulaAccepted() {
|
| + return eula_accepted_;
|
| +}
|
| +#endif
|
| +
|
| +bool TestRequestAllowedNotifier::ResourceRequestsAllowed() {
|
| + if (override_requests_allowed_)
|
| + return requests_allowed_;
|
| + return ResourceRequestAllowedNotifier::ResourceRequestsAllowed();
|
| +}
|
|
|