forked from chromium/chromium
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathfake_consent_auditor.h
56 lines (40 loc) · 1.64 KB
/
fake_consent_auditor.h
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
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
// Copyright 2018 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.
#ifndef COMPONENTS_CONSENT_AUDITOR_FAKE_CONSENT_AUDITOR_H_
#define COMPONENTS_CONSENT_AUDITOR_FAKE_CONSENT_AUDITOR_H_
#include <vector>
#include "base/macros.h"
#include "components/consent_auditor/consent_auditor.h"
namespace syncer {
class UserEventService;
}
class PrefService;
namespace consent_auditor {
class FakeConsentAuditor : public ConsentAuditor {
public:
FakeConsentAuditor(PrefService* pref_service,
syncer::UserEventService* user_event_service);
~FakeConsentAuditor() override;
void RecordGaiaConsent(const std::string& account_id,
consent_auditor::Feature feature,
const std::vector<int>& description_grd_ids,
int confirmation_grd_id,
consent_auditor::ConsentStatus status) override;
const std::string& account_id() const { return account_id_; }
const std::vector<std::vector<int>>& recorded_id_vectors() {
return recorded_id_vectors_;
}
const std::vector<Feature>& recorded_features() { return recorded_features_; }
const std::vector<ConsentStatus>& recorded_statuses() {
return recorded_statuses_;
}
private:
std::string account_id_;
std::vector<std::vector<int>> recorded_id_vectors_;
std::vector<Feature> recorded_features_;
std::vector<ConsentStatus> recorded_statuses_;
DISALLOW_COPY_AND_ASSIGN(FakeConsentAuditor);
};
} // namespace consent_auditor
#endif // COMPONENTS_CONSENT_AUDITOR_FAKE_CONSENT_AUDITOR_H_