summaryrefslogtreecommitdiffstats
path: root/chrome/renderer/safe_browsing/feature_extractor_clock.h
blob: 54bff0631e434cbda47df452d871b46db696f9d3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
// Copyright (c) 2010 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.
//
// A simple abstraction for getting the current time during feature extraction.
// This can be mocked out for testing.

#ifndef CHROME_RENDERER_SAFE_BROWSING_FEATURE_EXTRACTOR_CLOCK_H_
#define CHROME_RENDERER_SAFE_BROWSING_FEATURE_EXTRACTOR_CLOCK_H_

#include "base/time.h"

namespace safe_browsing {

class FeatureExtractorClock {
 public:
  FeatureExtractorClock() {}
  virtual ~FeatureExtractorClock();

  // Returns the current time.  May be mocked for testing.
  virtual base::TimeTicks Now();

 private:
  DISALLOW_COPY_AND_ASSIGN(FeatureExtractorClock);
};

}  // namespace safe_browsing

#endif  // CHROME_RENDERER_SAFE_BROWSING_FEATURE_EXTRACTOR_CLOCK_H_