OLD | NEW |
(Empty) | |
| 1 // Copyright 2017 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 COMPONENTS_SYNC_USER_EVENTS_NO_OP_USER_EVENT_SERVICE_H_ |
| 6 #define COMPONENTS_SYNC_USER_EVENTS_NO_OP_USER_EVENT_SERVICE_H_ |
| 7 |
| 8 #include <memory> |
| 9 #include <string> |
| 10 |
| 11 #include "base/macros.h" |
| 12 #include "components/sync/user_events/user_event_service.h" |
| 13 |
| 14 namespace syncer { |
| 15 |
| 16 class ModelTypeSyncBridge; |
| 17 |
| 18 // This implementation is used when we know event should never be recorded, |
| 19 // such as in incognito mode. |
| 20 class NoOpUserEventService : public UserEventService { |
| 21 public: |
| 22 NoOpUserEventService(); |
| 23 ~NoOpUserEventService() override; |
| 24 |
| 25 // UserEventService implementation. |
| 26 void RecordUserEvent( |
| 27 std::unique_ptr<sync_pb::UserEventSpecifics> specifics) override; |
| 28 void RecordUserEvent(const sync_pb::UserEventSpecifics& specifics) override; |
| 29 void RegisterDependentFieldTrial( |
| 30 const std::string& trial_name, |
| 31 sync_pb::UserEventSpecifics::EventCase event_case) override; |
| 32 base::WeakPtr<ModelTypeSyncBridge> GetSyncBridge() override; |
| 33 |
| 34 private: |
| 35 DISALLOW_COPY_AND_ASSIGN(NoOpUserEventService); |
| 36 }; |
| 37 |
| 38 } // namespace syncer |
| 39 |
| 40 #endif // COMPONENTS_SYNC_USER_EVENTS_NO_OP_USER_EVENT_SERVICE_H_ |
OLD | NEW |