Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(51)

Side by Side Diff: components/ukm/test_ukm_recorder.h

Issue 2883563002: Refactor UKM interface for mojo-ification (Closed)
Patch Set: Move interface to next CL Created 3 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
(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_UKM_TEST_UKM_SERVICE_H_
6 #define COMPONENTS_UKM_TEST_UKM_SERVICE_H_
7
8 #include <stddef.h>
9 #include <memory>
10
11 #include "components/ukm/ukm_recorder_impl.h"
12
oystein (OOO til 10th of July) 2017/05/17 18:25:06 Should have #include "base/macros.h" here I think.
Steven Holte 2017/05/17 20:44:31 Done.
13 namespace ukm {
14
15 // Wraps an UkmRecorder with additional accessors used for testing.
16 class TestUkmRecorder : public UkmRecorderImpl {
17 public:
18 explicit TestUkmRecorder();
oystein (OOO til 10th of July) 2017/05/17 18:25:06 nit: No need for explicit here.
Steven Holte 2017/05/17 20:44:31 Done.
19 ~TestUkmRecorder() override;
20
21 size_t sources_count() const { return sources().size(); }
22 const std::map<ukm::SourceId, std::unique_ptr<UkmSource>>& GetSources() const;
oystein (OOO til 10th of July) 2017/05/17 18:25:06 Why isn't this inlined, like the others, if it's b
Steven Holte 2017/05/17 20:44:31 inlined
23 const UkmSource* GetSourceForUrl(const char* url) const;
24 const UkmSource* GetSourceForSourceId(ukm::SourceId source_id) const;
25
26 size_t entries_count() const { return entries().size(); }
27 const mojom::UkmEntry* GetEntry(size_t entry_num) const;
28 const mojom::UkmEntry* GetEntryForEntryName(const char* entry_name) const;
29
30 static const mojom::UkmMetric* FindMetric(const mojom::UkmEntry* entry,
31 const char* metric_name);
32
33 private:
34 DISALLOW_COPY_AND_ASSIGN(TestUkmRecorder);
35 };
36
37 } // namespace ukm
38
39 #endif // COMPONENTS_UKM_TEST_UKM_SERVICE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698