#ifndef CHROME_BROWSER_METRICS_VARIATIONS_VARIATIONS_REQUEST_SCHEDULER_MOBILE_H_
#define CHROME_BROWSER_METRICS_VARIATIONS_VARIATIONS_REQUEST_SCHEDULER_MOBILE_H_
#include "base/bind.h"
#include "chrome/browser/metrics/variations/variations_request_scheduler.h"
class PrefService;
namespace chrome_variations {
class VariationsRequestSchedulerMobile : public VariationsRequestScheduler {
public:
explicit VariationsRequestSchedulerMobile(const base::Closure& task,
PrefService* local_state);
virtual ~VariationsRequestSchedulerMobile();
virtual void Start() OVERRIDE;
virtual void Reset() OVERRIDE;
virtual void OnAppEnterForeground() OVERRIDE;
private:
FRIEND_TEST_ALL_PREFIXES(VariationsRequestSchedulerMobileTest,
OnAppEnterForegroundNoRun);
FRIEND_TEST_ALL_PREFIXES(VariationsRequestSchedulerMobileTest,
OnAppEnterForegroundRun);
FRIEND_TEST_ALL_PREFIXES(VariationsRequestSchedulerMobileTest,
OnAppEnterForegroundOnStartup);
PrefService* local_state_;
base::OneShotTimer<VariationsRequestSchedulerMobile> schedule_fetch_timer_;
base::Time last_request_time_;
DISALLOW_COPY_AND_ASSIGN(VariationsRequestSchedulerMobile);
};
}
#endif