chromium/chrome/browser/enterprise/connectors/reporting/extension_install_event_router.cc

// Copyright 2022 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#include "chrome/browser/enterprise/connectors/reporting/extension_install_event_router.h"

#include <optional>

#include "base/feature_list.h"
#include "base/memory/singleton.h"
#include "chrome/browser/enterprise/connectors/common.h"
#include "chrome/browser/enterprise/connectors/reporting/realtime_reporting_client_factory.h"
#include "chrome/browser/extensions/chrome_content_browser_client_extensions_part.h"
#include "components/enterprise/connectors/core/reporting_service_settings.h"
#include "components/keyed_service/content/browser_context_dependency_manager.h"
#include "extensions/browser/extension_registry.h"
#include "extensions/browser/extension_registry_factory.h"

namespace enterprise_connectors {

namespace {

// Key names used with when building the dictionary to pass to the real-time
// reporting API. These matches proto defined in
// google3/chrome/cros/reporting/api/proto/browser_events.proto
constexpr char kKeyId[] =;
constexpr char kKeyName[] =;
constexpr char kKeyDescription[] =;
constexpr char kKeyAction[] =;
constexpr char kKeyVersion[] =;
constexpr char kKeySource[] =;

// Extension action types
constexpr char kInstallAction[] =;
constexpr char kUpdateAction[] =;
constexpr char kUninstallAction[] =;

// Extension sources
constexpr char kChromeWebstoreSource[] =;
constexpr char kExternalSource[] =;

}  // namespace

ExtensionInstallEventRouter::ExtensionInstallEventRouter(
    content::BrowserContext* context) {}

ExtensionInstallEventRouter::~ExtensionInstallEventRouter() {}

void ExtensionInstallEventRouter::ReportExtensionInstallEvent(
    const extensions::Extension* extension,
    const char* extension_action) {}

void ExtensionInstallEventRouter::OnExtensionInstalled(
    content::BrowserContext* browser_context,
    const extensions::Extension* extension,
    bool is_update) {}

void ExtensionInstallEventRouter::OnExtensionUninstalled(
    content::BrowserContext* browser_context,
    const extensions::Extension* extension,
    extensions::UninstallReason reason) {}

// static
ExtensionInstallEventRouterFactory*
ExtensionInstallEventRouterFactory::GetInstance() {}

ExtensionInstallEventRouter*
ExtensionInstallEventRouterFactory::GetForBrowserContext(
    content::BrowserContext* context) {}

ExtensionInstallEventRouterFactory::ExtensionInstallEventRouterFactory()
    :{}

ExtensionInstallEventRouterFactory::~ExtensionInstallEventRouterFactory() =
    default;

bool ExtensionInstallEventRouterFactory::ServiceIsCreatedWithBrowserContext()
    const {}

KeyedService* ExtensionInstallEventRouterFactory::BuildServiceInstanceFor(
    content::BrowserContext* context) const {}

content::BrowserContext*
ExtensionInstallEventRouterFactory::GetBrowserContextToUse(
    content::BrowserContext* context) const {}

}  // namespace enterprise_connectors