[M73 Dev][EFL] Disable VizDisplayCompositor for EFL port
[platform/framework/web/chromium-efl.git] / components / ukm / app_source_url_recorder.h
1 // Copyright 2018 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_APP_SOURCE_URL_RECORDER_H_
6 #define COMPONENTS_UKM_APP_SOURCE_URL_RECORDER_H_
7
8 #include "services/metrics/public/cpp/ukm_source_id.h"
9
10 #include "base/feature_list.h"
11
12 #include <string>
13
14 class GURL;
15
16 namespace app_list {
17 class AppLaunchEventLogger;
18 }
19
20 namespace ukm {
21
22 const base::Feature kUkmAppLogging{"UkmAppLogging",
23                                    base::FEATURE_ENABLED_BY_DEFAULT};
24
25 class AppSourceUrlRecorder {
26  private:
27   friend class AppSourceUrlRecorderTest;
28
29   friend class app_list::AppLaunchEventLogger;
30
31   // Get a UKM SourceId for a Chrome app.
32   static SourceId GetSourceIdForChromeApp(const std::string& id);
33
34   // Get a UKM SourceId for an Arc app.
35   static SourceId GetSourceIdForArc(const std::string& package_name);
36
37   // Get a UKM SourceId for a PWA.
38   static SourceId GetSourceIdForPWA(const GURL& url);
39
40   // For internal use only.
41   static SourceId GetSourceIdForUrl(const GURL& url);
42 };
43
44 }  // namespace ukm
45
46 #endif  // COMPONENTS_UKM_APP_SOURCE_URL_RECORDER_H_