Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(49)

Unified Diff: chrome/browser/metrics/variations/resource_request_allowed_notifier_test_util.cc

Issue 13620010: Refactor ResourceRequestAllowedNotifier EULA checking into a separate class. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 7 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: chrome/browser/metrics/variations/resource_request_allowed_notifier_test_util.cc
===================================================================
--- chrome/browser/metrics/variations/resource_request_allowed_notifier_test_util.cc (revision 192607)
+++ chrome/browser/metrics/variations/resource_request_allowed_notifier_test_util.cc (working copy)
@@ -4,22 +4,20 @@
#include "chrome/browser/metrics/variations/resource_request_allowed_notifier_test_util.h"
-TestRequestAllowedNotifier::TestRequestAllowedNotifier() :
-#if defined(OS_CHROMEOS)
- needs_eula_acceptance_(true),
-#endif
- override_requests_allowed_(false),
+TestRequestAllowedNotifier::TestRequestAllowedNotifier()
+ : override_requests_allowed_(false),
requests_allowed_(true) {
}
TestRequestAllowedNotifier::~TestRequestAllowedNotifier() {
}
-#if defined(OS_CHROMEOS)
-void TestRequestAllowedNotifier::SetNeedsEulaAcceptance(bool needs_acceptance) {
- needs_eula_acceptance_ = needs_acceptance;
+void TestRequestAllowedNotifier::InitWithEulaAcceptNotifier(
+ Observer* observer,
+ scoped_ptr<EulaAcceptedNotifier> eula_notifier) {
+ test_eula_notifier_.swap(eula_notifier);
+ Init(observer);
}
-#endif
void TestRequestAllowedNotifier::SetRequestsAllowedOverride(bool allowed) {
override_requests_allowed_ = true;
@@ -45,8 +43,7 @@
return requests_allowed;
}
-#if defined(OS_CHROMEOS)
-bool TestRequestAllowedNotifier::NeedsEulaAcceptance() {
- return needs_eula_acceptance_;
+EulaAcceptedNotifier* TestRequestAllowedNotifier::CreateEulaNotifier() {
+ return test_eula_notifier_.release();
}
-#endif
+

Powered by Google App Engine
This is Rietveld 408576698