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

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

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.h
===================================================================
--- chrome/browser/metrics/variations/resource_request_allowed_notifier_test_util.h (revision 192635)
+++ chrome/browser/metrics/variations/resource_request_allowed_notifier_test_util.h (working copy)
@@ -21,9 +21,10 @@
TestRequestAllowedNotifier();
virtual ~TestRequestAllowedNotifier();
-#if defined(OS_CHROMEOS)
- void SetNeedsEulaAcceptance(bool needs_acceptance);
-#endif
+ // A version of |Init()| that accepts a custom EulaAcceptedNotifier.
+ void InitWithEulaAcceptNotifier(
+ Observer* observer,
+ scoped_ptr<EulaAcceptedNotifier> eula_notifier);
// Makes ResourceRequestsAllowed return |allowed| when it is called.
void SetRequestsAllowedOverride(bool allowed);
@@ -32,17 +33,12 @@
// the observer is expecting a notification.
void NotifyObserver();
+ // ResourceRequestAllowedNotifier overrides:
virtual bool ResourceRequestsAllowed() OVERRIDE;
+ virtual EulaAcceptedNotifier* CreateEulaNotifier() OVERRIDE;
- protected:
-#if defined(OS_CHROMEOS)
- virtual bool NeedsEulaAcceptance() OVERRIDE;
-#endif
-
private:
-#if defined(OS_CHROMEOS)
- bool needs_eula_acceptance_;
-#endif
+ scoped_ptr<EulaAcceptedNotifier> test_eula_notifier_;
bool override_requests_allowed_;
bool requests_allowed_;

Powered by Google App Engine
This is Rietveld 408576698