chromium/components/navigation_metrics/navigation_metrics.cc

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

#ifdef UNSAFE_BUFFERS_BUILD
// TODO(crbug.com/40285824): Remove this and convert code to safer constructs.
#pragma allow_unsafe_buffers
#endif

#include "components/navigation_metrics/navigation_metrics.h"

#include <iterator>
#include <string>

#include "base/feature_list.h"
#include "base/i18n/rtl.h"
#include "base/metrics/histogram_macros.h"
#include "base/strings/string_split.h"
#include "base/strings/string_util.h"
#include "base/strings/utf_string_conversions.h"
#include "components/dom_distiller/core/url_constants.h"
#include "components/profile_metrics/browser_profile_type.h"
#include "components/url_formatter/url_formatter.h"
#include "net/base/registry_controlled_domains/registry_controlled_domain.h"
#include "net/base/url_util.h"
#include "url/gurl.h"
#include "url/url_canon.h"
#include "url/url_features.h"

namespace navigation_metrics {

const char kMainFrameScheme[] =;
const char kMainFrameSchemeDifferentPage[] =;
// Same as kMainFrameSchemeDifferentPage, but only recorded if the hostname is
// non-unique (e.g. http://site.test):
const char kMainFrameSchemeDifferentPageNonUniqueHostname[] =;
const char kMainFrameSchemeOTR[] =;
const char kMainFrameSchemeDifferentPageOTR[] =;
const char kMainFrameHasRTLDomain[] =;
const char kMainFrameHasRTLDomainDifferentPage[] =;
const char kMainFrameProfileType[] =;

namespace {

const char* const kSchemeNames[] =;

static_assert;

// Returns the eTLD+1 of `hostname16`. Excludes private registries such as
// blogspot.com so that test.blogspot.com returns blogspot.com.
std::u16string GetEtldPlusOne16(const std::u16string& hostname16) {}

}  // namespace

Scheme GetScheme(const GURL& url) {}

void RecordPrimaryMainFrameNavigation(
    const GURL& url,
    bool is_same_document,
    bool is_off_the_record,
    profile_metrics::BrowserProfileType profile_type) {}

void RecordOmniboxURLNavigation(const GURL& url) {}

IDNA2008DeviationCharacter RecordIDNA2008Metrics(
    const std::u16string& hostname16) {}

}  // namespace navigation_metrics