1 // Copyright 2019 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4 
5 #ifndef CHROME_BROWSER_SECURITY_EVENTS_SECURITY_EVENT_RECORDER_IMPL_H_
6 #define CHROME_BROWSER_SECURITY_EVENTS_SECURITY_EVENT_RECORDER_IMPL_H_
7 
8 #include <memory>
9 #include <string>
10 #include <vector>
11 
12 #include "base/macros.h"
13 #include "base/time/clock.h"
14 #include "chrome/browser/security_events/security_event_recorder.h"
15 #include "chrome/browser/security_events/security_event_sync_bridge.h"
16 
17 class SecurityEventRecorderImpl : public SecurityEventRecorder {
18  public:
19   SecurityEventRecorderImpl(
20       std::unique_ptr<SecurityEventSyncBridge> security_event_sync_bridge,
21       base::Clock* clock);
22   ~SecurityEventRecorderImpl() override;
23 
24   void RecordGaiaPasswordReuse(
25       const sync_pb::GaiaPasswordReuse& event) override;
26 
27   base::WeakPtr<syncer::ModelTypeControllerDelegate> GetControllerDelegate()
28       override;
29 
30   // KeyedService (through SecurityEventRecorder) implementation.
31   void Shutdown() override;
32 
33  private:
34   std::unique_ptr<SecurityEventSyncBridge> security_event_sync_bridge_;
35   base::Clock* clock_;
36 
37   DISALLOW_COPY_AND_ASSIGN(SecurityEventRecorderImpl);
38 };
39 
40 #endif  // CHROME_BROWSER_SECURITY_EVENTS_SECURITY_EVENT_RECORDER_IMPL_H_
41