0

Remove various expired Offline Pages UMA histograms.

Code Health Rotation

Bug: 1508091, 1508090, 1508089, 1508088, 1508087, 1508086, 1508085, 1508084, 1508083
Change-Id: Ib65dfae4398529cbeb168d10e46b80b5f5b93ec3
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5119363
Code-Coverage: findit-for-me@appspot.gserviceaccount.com <findit-for-me@appspot.gserviceaccount.com>
Reviewed-by: Roger McFarlane <rogerm@chromium.org>
Auto-Submit: Allen Bauer <kylixrd@chromium.org>
Reviewed-by: Robert Ogden <robertogden@chromium.org>
Commit-Queue: Allen Bauer <kylixrd@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1238171}
This commit is contained in:
Allen Bauer
2023-12-15 18:57:56 +00:00
committed by Chromium LUCI CQ
parent 09c36fe3f1
commit ddc6dc25c9
20 changed files with 2 additions and 396 deletions

@ -43,24 +43,6 @@ namespace offline_pages {
namespace {
std::string AddHistogramSuffix(const ClientId& client_id,
const char* histogram_name) {
if (client_id.name_space.empty()) {
NOTREACHED();
return histogram_name;
}
std::string adjusted_histogram_name(histogram_name);
adjusted_histogram_name += "." + client_id.name_space;
return adjusted_histogram_name;
}
void RecordErrorCauseUMA(const ClientId& client_id, int error_code) {
base::UmaHistogramSparse(
AddHistogramSuffix(client_id,
"OfflinePages.Background.LoadingErrorStatusCode"),
error_code);
}
void HandleLoadTerminationCancel(
Offliner::CompletionCallback completion_callback,
const SavePageRequest& canceled_request) {
@ -294,8 +276,6 @@ void BackgroundLoaderOffliner::DidFinishNavigation(
// If there was an error of any kind (certificate, client, DNS, etc),
// Mark as error page. Resetting here causes RecordNavigationMetrics to crash.
if (navigation_handle->IsErrorPage()) {
RecordErrorCauseUMA(pending_request_->client_id(),
static_cast<int>(navigation_handle->GetNetErrorCode()));
page_load_state_ = RETRIABLE_NET_ERROR;
} else {
int status_code = 200; // Default to OK.
@ -308,7 +288,6 @@ void BackgroundLoaderOffliner::DidFinishNavigation(
// 400+ codes are client and server errors.
// We skip 418 because it's a teapot.
if (status_code == 301 || (status_code >= 400 && status_code != 418)) {
RecordErrorCauseUMA(pending_request_->client_id(), status_code);
page_load_state_ = RETRIABLE_HTTP_ERROR;
}
}

@ -646,10 +646,6 @@ TEST_F(BackgroundLoaderOfflinerTest, FailsOnErrorPage) {
handle.set_net_error_code(net::Error::ERR_NAME_NOT_RESOLVED);
offliner()->DidFinishNavigation(&handle);
histograms().ExpectBucketCount(
"OfflinePages.Background.LoadingErrorStatusCode.async_loading",
-105, // ERR_NAME_NOT_RESOLVED
1);
CompleteLoading();
PumpLoop();
@ -940,10 +936,6 @@ TEST_F(BackgroundLoaderOfflinerTest,
offliner()->DidFinishNavigation(&handle);
// The error histogram should be 0.
histograms().ExpectBucketCount(
"OfflinePages.Background.LoadingErrorStatusCode.async_loading",
-105, // ERR_NAME_NOT_RESOLVED
0);
CompleteLoading();
PumpLoop();

@ -202,8 +202,6 @@ void OfflinePageTabHelper::DidFinishNavigation(
FinalizeOfflineInfo(navigation_handle);
provisional_offline_info_.Clear();
ReportOfflinePageMetrics();
TryLoadingOfflinePageOnNetError(navigation_handle);
}
@ -245,14 +243,6 @@ void OfflinePageTabHelper::FinalizeOfflineInfo(
}
}
void OfflinePageTabHelper::ReportOfflinePageMetrics() {
if (!offline_page())
return;
UMA_HISTOGRAM_ENUMERATION("OfflinePages.TrustStateOnOpen",
offline_info_.trusted_state,
OfflinePageTrustedState::TRUSTED_STATE_MAX);
}
void OfflinePageTabHelper::TryLoadingOfflinePageOnNetError(
content::NavigationHandle* navigation_handle) {
// If the offline page has been loaded successfully, nothing more to do.

@ -171,8 +171,6 @@ class OfflinePageTabHelper
// Finalize the offline info when the navigation is done.
void FinalizeOfflineInfo(content::NavigationHandle* navigation_handle);
void ReportOfflinePageMetrics();
// Reload the URL in order to fetch the offline page on certain net errors.
void TryLoadingOfflinePageOnNetError(
content::NavigationHandle* navigation_handle);

@ -341,23 +341,6 @@ void RecentTabHelper::WebContentsWasHidden() {
weak_ptr_factory_.GetWeakPtr(),
last_n_ongoing_snapshot_info_.get()));
IsSavingSamePageEnum saving_same_page_value = IsSavingSamePageEnum::kNewPage;
if (last_n_latest_saved_snapshot_info_) {
// If there was a previously saved snapshot for the current page we are
// saving a new one for the same page.
// Note: there might be a difference in page quality between here and when
// it's assessed again in ContinueSnapshotAfterPurge but this is not
// expected to happen often.
if (last_n_latest_saved_snapshot_info_->expected_page_quality ==
snapshot_controller_->current_page_quality()) {
saving_same_page_value = IsSavingSamePageEnum::kSamePageSameQuality;
} else {
saving_same_page_value = IsSavingSamePageEnum::kSamePageBetterQuality;
}
}
UMA_HISTOGRAM_ENUMERATION("OfflinePages.LastN.IsSavingSamePage",
saving_same_page_value);
last_n_latest_saved_snapshot_info_.reset();
}

@ -32,23 +32,6 @@ class RecentTabHelper
public content::WebContentsUserData<RecentTabHelper>,
public SnapshotController::Client {
public:
// Possible values to be reported to the IsSavingSamePage histogram. Reflects
// the contents of the respective histogram enum and must be kept in sync with
// it.
enum class IsSavingSamePageEnum {
// The snapshot is for a new page.
kNewPage = 0,
// The snapshot is for a page that has already been saved but a better
// expected quality.
kSamePageBetterQuality = 1,
// The snapshot is for a page that has already been saved at the same
// expected quality.
kSamePageSameQuality = 2,
// Note: Always leave this item last. Update if the actual last item
// changes.
kMaxValue = kSamePageSameQuality,
};
RecentTabHelper(const RecentTabHelper&) = delete;
RecentTabHelper& operator=(const RecentTabHelper&) = delete;

@ -34,7 +34,6 @@ namespace offline_pages {
namespace {
using IsSavingSamePageEnum = RecentTabHelper::IsSavingSamePageEnum;
const int kTabId = 153;
} // namespace
@ -355,8 +354,6 @@ TEST_F(RecentTabHelperTest, LastNCaptureAfterLoad) {
ASSERT_EQ(1U, GetAllPages().size());
EXPECT_EQ(kTestUrl, GetAllPages()[0].url);
EXPECT_EQ(kLastNNamespace, GetAllPages()[0].client_id.name_space);
histogram_tester()->ExpectUniqueSample("OfflinePages.LastN.IsSavingSamePage",
IsSavingSamePageEnum::kNewPage, 1);
}
// Simulates the tab being hidden too early in the page loading so that a
@ -375,8 +372,6 @@ TEST_F(RecentTabHelperTest, NoLastNCaptureIfTabHiddenTooEarlyInPageLoad) {
FastForwardSnapshotController();
EXPECT_EQ(0U, page_added_count());
ASSERT_EQ(0U, GetAllPages().size());
histogram_tester()->ExpectTotalCount("OfflinePages.LastN.IsSavingSamePage",
0);
}
// Checks that WebContents with no tab IDs have snapshot requests properly
@ -396,8 +391,6 @@ TEST_F(RecentTabHelperTest, NoTabIdNoCapture) {
// No page should be captured.
EXPECT_EQ(0U, page_added_count());
ASSERT_EQ(0U, GetAllPages().size());
histogram_tester()->ExpectTotalCount("OfflinePages.LastN.IsSavingSamePage",
0);
}
// Checks that last_n is disabled if the device is low-end (aka svelte) but that
@ -422,8 +415,6 @@ TEST_F(RecentTabHelperTest, LastNDisabledOnSvelte) {
RunUntilIdle();
EXPECT_EQ(1U, page_added_count());
ASSERT_EQ(1U, GetAllPages().size());
histogram_tester()->ExpectTotalCount("OfflinePages.LastN.IsSavingSamePage",
0);
}
// Checks that last_n will not save a snapshot while the tab is being presented
@ -447,8 +438,6 @@ TEST_F(RecentTabHelperTest, LastNWontSaveCustomTab) {
RunUntilIdle();
EXPECT_EQ(1U, page_added_count());
ASSERT_EQ(1U, GetAllPages().size());
histogram_tester()->ExpectTotalCount("OfflinePages.LastN.IsSavingSamePage",
0);
// Simulates the tab being transfered from the CustomTabActivity back to a
// ChromeActivity.
@ -459,8 +448,6 @@ TEST_F(RecentTabHelperTest, LastNWontSaveCustomTab) {
RunUntilIdle();
EXPECT_EQ(2U, page_added_count());
ASSERT_EQ(2U, GetAllPages().size());
histogram_tester()->ExpectUniqueSample("OfflinePages.LastN.IsSavingSamePage",
IsSavingSamePageEnum::kNewPage, 1);
}
// Triggers two last_n snapshot captures during a single page load. Should end
@ -481,8 +468,6 @@ TEST_F(RecentTabHelperTest, TwoCapturesSamePageLoad) {
EXPECT_EQ(0U, model_removed_count());
ASSERT_EQ(1U, GetAllPages().size());
EXPECT_EQ(kTestUrl, GetAllPages()[0].url);
histogram_tester()->ExpectUniqueSample("OfflinePages.LastN.IsSavingSamePage",
IsSavingSamePageEnum::kNewPage, 1);
int64_t first_offline_id = GetAllPages()[0].offline_id;
// Set page loading state to the 2nd and last snapshot-able stage. No new
@ -502,11 +487,6 @@ TEST_F(RecentTabHelperTest, TwoCapturesSamePageLoad) {
ASSERT_EQ(1U, GetAllPages().size());
EXPECT_EQ(kTestUrl, GetAllPages()[0].url);
EXPECT_NE(first_offline_id, GetAllPages()[0].offline_id);
histogram_tester()->ExpectTotalCount("OfflinePages.LastN.IsSavingSamePage",
2);
histogram_tester()->ExpectBucketCount(
"OfflinePages.LastN.IsSavingSamePage",
IsSavingSamePageEnum::kSamePageBetterQuality, 1);
}
// Triggers two last_n captures during a single page load, where the 2nd capture
@ -561,8 +541,6 @@ TEST_F(RecentTabHelperTest, TwoCapturesDifferentPageLoadsSameUrl) {
EXPECT_EQ(0U, model_removed_count());
ASSERT_EQ(1U, GetAllPages().size());
EXPECT_EQ(kTestUrl, GetAllPages()[0].url);
histogram_tester()->ExpectUniqueSample("OfflinePages.LastN.IsSavingSamePage",
IsSavingSamePageEnum::kNewPage, 1);
int64_t first_offline_id = GetAllPages()[0].offline_id;
// Reload the same URL until the page is minimally loaded. The previous
@ -582,8 +560,6 @@ TEST_F(RecentTabHelperTest, TwoCapturesDifferentPageLoadsSameUrl) {
ASSERT_EQ(1U, GetAllPages().size());
EXPECT_EQ(kTestUrl, GetAllPages()[0].url);
EXPECT_NE(first_offline_id, GetAllPages()[0].offline_id);
histogram_tester()->ExpectUniqueSample("OfflinePages.LastN.IsSavingSamePage",
IsSavingSamePageEnum::kNewPage, 2);
}
// Triggers two last_n captures for two different page loads of the same URL
@ -601,8 +577,6 @@ TEST_F(RecentTabHelperTest, TwoCapturesWhere2ndFailsDifferentPageLoadsSameUrl) {
EXPECT_EQ(0U, model_removed_count());
ASSERT_EQ(1U, GetAllPages().size());
EXPECT_EQ(kTestUrl, GetAllPages()[0].url);
histogram_tester()->ExpectUniqueSample("OfflinePages.LastN.IsSavingSamePage",
IsSavingSamePageEnum::kNewPage, 1);
// Updates the delegate so that will make the second snapshot fail.
default_test_delegate()->set_archive_size(-1);
@ -620,8 +594,6 @@ TEST_F(RecentTabHelperTest, TwoCapturesWhere2ndFailsDifferentPageLoadsSameUrl) {
EXPECT_EQ(1U, page_added_count());
EXPECT_EQ(1U, model_removed_count());
ASSERT_EQ(0U, GetAllPages().size());
histogram_tester()->ExpectUniqueSample("OfflinePages.LastN.IsSavingSamePage",
IsSavingSamePageEnum::kNewPage, 2);
}
// Triggers two last_n captures for two different page loads of different URLs.
@ -639,8 +611,6 @@ TEST_F(RecentTabHelperTest, TwoCapturesDifferentPageLoadsDifferentUrls) {
EXPECT_EQ(0U, model_removed_count());
ASSERT_EQ(1U, GetAllPages().size());
EXPECT_EQ(kTestUrl, GetAllPages()[0].url);
histogram_tester()->ExpectUniqueSample("OfflinePages.LastN.IsSavingSamePage",
IsSavingSamePageEnum::kNewPage, 1);
// Fully load the second URL. The previous snapshot should have been deleted.0
const GURL kOtherUrl("http://crazy.site/foo_other.html");
@ -659,8 +629,6 @@ TEST_F(RecentTabHelperTest, TwoCapturesDifferentPageLoadsDifferentUrls) {
EXPECT_EQ(1U, model_removed_count());
ASSERT_EQ(1U, GetAllPages().size());
EXPECT_EQ(kOtherUrl, GetAllPages()[0].url);
histogram_tester()->ExpectUniqueSample("OfflinePages.LastN.IsSavingSamePage",
IsSavingSamePageEnum::kNewPage, 2);
}
// Fully loads a page where last_n captures two snapshots. Then triggers two
@ -684,13 +652,6 @@ TEST_F(RecentTabHelperTest, TwoLastNAndTwoDownloadCapturesSamePage) {
EXPECT_EQ(1U, model_removed_count());
ASSERT_EQ(1U, GetAllPages().size());
EXPECT_EQ(kTestUrl, GetAllPages()[0].url);
histogram_tester()->ExpectTotalCount("OfflinePages.LastN.IsSavingSamePage",
2);
histogram_tester()->ExpectBucketCount("OfflinePages.LastN.IsSavingSamePage",
IsSavingSamePageEnum::kNewPage, 1);
histogram_tester()->ExpectBucketCount(
"OfflinePages.LastN.IsSavingSamePage",
IsSavingSamePageEnum::kSamePageBetterQuality, 1);
int64_t first_offline_id = GetAllPages()[0].offline_id;
// First snapshot request by downloads. Two offline pages are expected.
@ -723,8 +684,6 @@ TEST_F(RecentTabHelperTest, TwoLastNAndTwoDownloadCapturesSamePage) {
ASSERT_NE(nullptr, third_page);
EXPECT_EQ(kTestUrl, third_page->url);
EXPECT_EQ(third_client_id, third_page->client_id);
histogram_tester()->ExpectTotalCount("OfflinePages.LastN.IsSavingSamePage",
2);
}
// Simulates an error (disconnection) during the load of a page. Should end up
@ -738,8 +697,6 @@ TEST_F(RecentTabHelperTest, NoCaptureOnErrorPage) {
123L, "");
RunUntilIdle();
ASSERT_EQ(0U, GetAllPages().size());
histogram_tester()->ExpectTotalCount("OfflinePages.LastN.IsSavingSamePage",
0);
}
// Simulates a download request to offline the current page made early during
@ -773,8 +730,6 @@ TEST_F(RecentTabHelperTest, DownloadRequestEarlyInLoad) {
EXPECT_EQ(kTestUrl, later_page.url);
EXPECT_EQ(client_id, later_page.client_id);
EXPECT_EQ(153L, later_page.offline_id);
histogram_tester()->ExpectTotalCount("OfflinePages.LastN.IsSavingSamePage",
0);
}
// Simulates a download request to offline the current page made when the page
@ -801,8 +756,6 @@ TEST_F(RecentTabHelperTest, DownloadRequestLaterInLoad) {
EXPECT_EQ(2U, page_added_count());
EXPECT_EQ(1U, model_removed_count());
ASSERT_EQ(1U, GetAllPages().size());
histogram_tester()->ExpectTotalCount("OfflinePages.LastN.IsSavingSamePage",
0);
}
// Simulates a download request to offline the current page made after loading
@ -823,8 +776,6 @@ TEST_F(RecentTabHelperTest, DownloadRequestAfterFullyLoad) {
EXPECT_EQ(client_id, page.client_id);
EXPECT_EQ(153L, page.offline_id);
EXPECT_EQ("", page.request_origin);
histogram_tester()->ExpectTotalCount("OfflinePages.LastN.IsSavingSamePage",
0);
}
// Simulates a download request to offline the current page made after loading
@ -845,8 +796,6 @@ TEST_F(RecentTabHelperTest, DownloadRequestAfterFullyLoadWithOrigin) {
EXPECT_EQ(client_id, page.client_id);
EXPECT_EQ(153L, page.offline_id);
EXPECT_EQ("abc", page.request_origin);
histogram_tester()->ExpectTotalCount("OfflinePages.LastN.IsSavingSamePage",
0);
}
// Simulates requests coming from last_n and downloads at the same time for a
@ -863,8 +812,6 @@ TEST_F(RecentTabHelperTest, SimultaneousCapturesFromLastNAndDownloads) {
download_offline_id, "");
RunUntilIdle();
ASSERT_EQ(2U, GetAllPages().size());
histogram_tester()->ExpectUniqueSample("OfflinePages.LastN.IsSavingSamePage",
IsSavingSamePageEnum::kNewPage, 1);
const OfflinePageItem* downloads_page =
FindPageForOfflineId(download_offline_id);
@ -892,19 +839,12 @@ TEST_F(RecentTabHelperTest, DuplicateTabHiddenEventsShouldTriggerNewSnapshots) {
EXPECT_EQ(1U, page_added_count());
EXPECT_EQ(0U, model_removed_count());
ASSERT_EQ(1U, GetAllPages().size());
histogram_tester()->ExpectUniqueSample("OfflinePages.LastN.IsSavingSamePage",
IsSavingSamePageEnum::kNewPage, 1);
recent_tab_helper()->OnVisibilityChanged(content::Visibility::HIDDEN);
RunUntilIdle();
EXPECT_EQ(2U, page_added_count());
EXPECT_EQ(1U, model_removed_count());
ASSERT_EQ(1U, GetAllPages().size());
histogram_tester()->ExpectTotalCount("OfflinePages.LastN.IsSavingSamePage",
2);
histogram_tester()->ExpectBucketCount(
"OfflinePages.LastN.IsSavingSamePage",
IsSavingSamePageEnum::kSamePageSameQuality, 1);
recent_tab_helper()->DocumentOnLoadCompletedInPrimaryMainFrame();
FastForwardSnapshotController();
@ -913,22 +853,12 @@ TEST_F(RecentTabHelperTest, DuplicateTabHiddenEventsShouldTriggerNewSnapshots) {
EXPECT_EQ(3U, page_added_count());
EXPECT_EQ(2U, model_removed_count());
ASSERT_EQ(1U, GetAllPages().size());
histogram_tester()->ExpectTotalCount("OfflinePages.LastN.IsSavingSamePage",
3);
histogram_tester()->ExpectBucketCount(
"OfflinePages.LastN.IsSavingSamePage",
IsSavingSamePageEnum::kSamePageBetterQuality, 1);
recent_tab_helper()->OnVisibilityChanged(content::Visibility::HIDDEN);
RunUntilIdle();
EXPECT_EQ(4U, page_added_count());
EXPECT_EQ(3U, model_removed_count());
ASSERT_EQ(1U, GetAllPages().size());
histogram_tester()->ExpectTotalCount("OfflinePages.LastN.IsSavingSamePage",
4);
histogram_tester()->ExpectBucketCount(
"OfflinePages.LastN.IsSavingSamePage",
IsSavingSamePageEnum::kSamePageSameQuality, 2);
}
// Simulates multiple download requests and verifies that overlapping requests
@ -969,8 +899,6 @@ TEST_F(RecentTabHelperTest, OverlappingDownloadRequestsAreIgnored) {
ASSERT_TRUE(second_page);
EXPECT_EQ(client_id_3, second_page->client_id);
EXPECT_EQ(offline_id_3, second_page->offline_id);
histogram_tester()->ExpectTotalCount("OfflinePages.LastN.IsSavingSamePage",
0);
}
// Simulates a same document navigation and checks we snapshot correctly with
@ -986,8 +914,6 @@ TEST_F(RecentTabHelperTest, SaveSameDocumentNavigationSnapshots) {
EXPECT_EQ(1U, page_added_count());
EXPECT_EQ(0U, model_removed_count());
ASSERT_EQ(1U, GetAllPages().size());
histogram_tester()->ExpectUniqueSample("OfflinePages.LastN.IsSavingSamePage",
IsSavingSamePageEnum::kNewPage, 1);
// Now navigates same page and check the results of hiding the tab again.
// Another snapshot should be created to the updated URL.
@ -999,11 +925,6 @@ TEST_F(RecentTabHelperTest, SaveSameDocumentNavigationSnapshots) {
EXPECT_EQ(1U, model_removed_count());
ASSERT_EQ(1U, GetAllPages().size());
EXPECT_EQ(kTestPageUrlWithFragment, GetAllPages()[0].url);
histogram_tester()->ExpectTotalCount("OfflinePages.LastN.IsSavingSamePage",
2);
histogram_tester()->ExpectBucketCount(
"OfflinePages.LastN.IsSavingSamePage",
IsSavingSamePageEnum::kSamePageSameQuality, 1);
// Now create a download request and check the snapshot is properly created.
const ClientId client_id = NewDownloadClientId();
@ -1017,8 +938,6 @@ TEST_F(RecentTabHelperTest, SaveSameDocumentNavigationSnapshots) {
EXPECT_EQ(kTestPageUrlWithFragment, downloads_page->url);
EXPECT_EQ(client_id, downloads_page->client_id);
EXPECT_EQ(offline_id, downloads_page->offline_id);
histogram_tester()->ExpectTotalCount("OfflinePages.LastN.IsSavingSamePage",
2);
}
// Tests that a page reloaded is tracked as an actual load and properly saved.
@ -1030,8 +949,6 @@ TEST_F(RecentTabHelperTest, ReloadIsTrackedAsNavigationAndSavedOnlyUponLoad) {
recent_tab_helper()->OnVisibilityChanged(content::Visibility::HIDDEN);
RunUntilIdle();
ASSERT_EQ(1U, GetAllPages().size());
histogram_tester()->ExpectUniqueSample("OfflinePages.LastN.IsSavingSamePage",
IsSavingSamePageEnum::kNewPage, 1);
// Starts a reload and hides the tab before it minimally load. The previous
// snapshot should be removed.
@ -1051,8 +968,6 @@ TEST_F(RecentTabHelperTest, ReloadIsTrackedAsNavigationAndSavedOnlyUponLoad) {
EXPECT_EQ(2U, page_added_count());
EXPECT_EQ(1U, model_removed_count());
ASSERT_EQ(1U, GetAllPages().size());
histogram_tester()->ExpectUniqueSample("OfflinePages.LastN.IsSavingSamePage",
IsSavingSamePageEnum::kNewPage, 2);
}
// Checks that a closing tab doesn't trigger the creation of a snapshot. And
@ -1071,8 +986,6 @@ TEST_F(RecentTabHelperTest, NoSaveIfTabIsClosing) {
EXPECT_EQ(0U, page_added_count());
EXPECT_EQ(0U, model_removed_count());
ASSERT_EQ(0U, GetAllPages().size());
histogram_tester()->ExpectTotalCount("OfflinePages.LastN.IsSavingSamePage",
0);
// Simulates the page being restored and shown again, then hidden. At this
// moment a snapshot should be created.
@ -1082,8 +995,6 @@ TEST_F(RecentTabHelperTest, NoSaveIfTabIsClosing) {
EXPECT_EQ(1U, page_added_count());
EXPECT_EQ(0U, model_removed_count());
ASSERT_EQ(1U, GetAllPages().size());
histogram_tester()->ExpectUniqueSample("OfflinePages.LastN.IsSavingSamePage",
IsSavingSamePageEnum::kNewPage, 1);
}
TEST_F(RecentTabHelperTest, NoSaveOfflinePageCacheForPost) {
@ -1100,8 +1011,6 @@ TEST_F(RecentTabHelperTest, NoSaveOfflinePageCacheForPost) {
RunUntilIdle();
EXPECT_EQ(0U, page_added_count());
ASSERT_EQ(0U, GetAllPages().size());
histogram_tester()->ExpectTotalCount("OfflinePages.LastN.IsSavingSamePage",
0);
// A manual download should succeed despite being ineligible for OPC.
recent_tab_helper()->ObserveAndDownloadCurrentPage(NewDownloadClientId(),

@ -55,8 +55,6 @@ void CleanupVisualsTask::Run() {
void CleanupVisualsTask::Complete(Result result) {
TaskComplete();
UMA_HISTOGRAM_COUNTS_1000("OfflinePages.CleanupThumbnails.Count",
result.removed_rows);
std::move(complete_callback_).Run(result.success);
}

@ -66,9 +66,6 @@ TEST_F(CleanupVisualsTaskTest, CleanupNoVisuals) {
base::HistogramTester histogram_tester;
RunTask(std::make_unique<CleanupVisualsTask>(
store(), store_utils::FromDatabaseTime(1000), callback.Get()));
histogram_tester.ExpectUniqueSample("OfflinePages.CleanupThumbnails.Count", 0,
1);
}
TEST_F(CleanupVisualsTaskTest, CleanupAllCombinations) {
@ -124,9 +121,6 @@ TEST_F(CleanupVisualsTaskTest, CleanupAllCombinations) {
EXPECT_EQ(visuals2, MustReadVisuals(visuals2.offline_id));
EXPECT_EQ(visuals3, MustReadVisuals(visuals3.offline_id));
EXPECT_EQ(nullptr, ReadVisuals(visuals4.offline_id).get());
histogram_tester.ExpectUniqueSample("OfflinePages.CleanupThumbnails.Count", 1,
1);
}
} // namespace

@ -24,11 +24,6 @@ namespace {
void ReportAccessHistogram(int64_t offline_id,
base::Time access_time,
sql::Database* db) {
// Used as upper bound of PageAccessInterval histogram which is used for
// evaluating how good the expiration period is. The expiration period of a
// page will be longer than one year in extreme cases so it's good enough.
const int kMinutesPerYear = base::Days(365).InMinutes();
static const char kSql[] =
"SELECT client_namespace, last_access_time FROM " OFFLINE_PAGES_TABLE_NAME
" WHERE offline_id = ?";
@ -38,12 +33,6 @@ void ReportAccessHistogram(int64_t offline_id,
std::string name_space = statement.ColumnString(0);
UMA_HISTOGRAM_ENUMERATION("OfflinePages.AccessPageCount",
model_utils::ToNamespaceEnum(name_space));
base::Time last_access_time = statement.ColumnTime(1);
base::UmaHistogramCustomCounts(
model_utils::AddHistogramSuffix(name_space,
"OfflinePages.PageAccessInterval"),
(access_time - last_access_time).InMinutes(), 1, kMinutesPerYear, 100);
}
}

@ -54,10 +54,6 @@ TEST_F(MarkPageAccessedTaskTest, MarkPageAccessed) {
"OfflinePages.AccessPageCount",
static_cast<int>(model_utils::ToNamespaceEnum(kTestClientId.name_space)),
1);
histogram_tester()->ExpectUniqueSample(
model_utils::AddHistogramSuffix(kTestClientId.name_space,
"OfflinePages.PageAccessInterval"),
(current_time - page.last_access_time).InMinutes(), 1);
}
TEST_F(MarkPageAccessedTaskTest, MarkPageAccessedTwice) {
@ -82,10 +78,6 @@ TEST_F(MarkPageAccessedTaskTest, MarkPageAccessedTwice) {
"OfflinePages.AccessPageCount",
static_cast<int>(model_utils::ToNamespaceEnum(kTestClientId.name_space)),
1);
histogram_tester()->ExpectUniqueSample(
model_utils::AddHistogramSuffix(kTestClientId.name_space,
"OfflinePages.PageAccessInterval"),
(current_time - page.last_access_time).InMinutes(), 1);
base::Time second_time = OfflineTimeNow();
task = std::make_unique<MarkPageAccessedTask>(store(), kTestOfflineId,
@ -100,10 +92,6 @@ TEST_F(MarkPageAccessedTaskTest, MarkPageAccessedTwice) {
"OfflinePages.AccessPageCount",
static_cast<int>(model_utils::ToNamespaceEnum(kTestClientId.name_space)),
2);
histogram_tester()->ExpectBucketCount(
model_utils::AddHistogramSuffix(kTestClientId.name_space,
"OfflinePages.PageAccessInterval"),
(second_time - current_time).InMinutes(), 1);
}
} // namespace offline_pages

@ -90,15 +90,6 @@ SavePageResult AddPageResultToSavePageResult(AddPageResult add_page_result) {
return SavePageResult::STORE_FAILURE;
}
void ReportPageHistogramAfterSuccessfulSaving(
const OfflinePageItem& offline_page,
base::Time save_time) {
base::UmaHistogramCustomCounts(
model_utils::AddHistogramSuffix(offline_page.client_id.name_space,
"OfflinePages.PageSize"),
offline_page.file_size / 1024, 1, 10000, 50);
}
void ReportSavedPagesCount(MultipleOfflinePageItemCallback callback,
const MultipleOfflinePageItemResult& all_items) {
std::move(callback).Run(all_items);
@ -472,9 +463,6 @@ void OfflinePageModelTaskified::OnAddPageForSavePageDone(
InformSavePageDone(std::move(callback), save_page_result,
page_attempted.client_id, offline_id);
if (save_page_result == SavePageResult::SUCCESS) {
base::Time successful_finish_time = OfflineTimeNow();
ReportPageHistogramAfterSuccessfulSaving(page_attempted,
successful_finish_time);
// TODO(romax): Just keep the same with logic in OPMImpl (which was wrong).
// This should be fixed once we have the new strategy for clearing pages.
if (GetPolicy(page_attempted.client_id.name_space).pages_allowed_per_url !=

@ -377,11 +377,6 @@ TEST_F(OfflinePageModelTaskifiedTest, SavePageSuccessful) {
EXPECT_EQ(kTestUrl2, saved_page_ptr->original_url_if_different);
EXPECT_EQ("", saved_page_ptr->request_origin);
EXPECT_EQ(kTestDigest, saved_page_ptr->digest);
histogram_tester()->ExpectUniqueSample(
model_utils::AddHistogramSuffix(kTestClientId1.name_space,
"OfflinePages.PageSize"),
kTestFileSize / 1024, 1);
}
TEST_F(OfflinePageModelTaskifiedTest, SavePageSuccessfulWithSameOriginalUrl) {
@ -401,11 +396,6 @@ TEST_F(OfflinePageModelTaskifiedTest, SavePageSuccessfulWithSameOriginalUrl) {
EXPECT_EQ(kTestUrl, saved_page_ptr->url);
// The original URL should be empty.
EXPECT_TRUE(saved_page_ptr->original_url_if_different.is_empty());
histogram_tester()->ExpectUniqueSample(
model_utils::AddHistogramSuffix(kTestClientId1.name_space,
"OfflinePages.PageSize"),
kTestFileSize / 1024, 1);
}
TEST_F(OfflinePageModelTaskifiedTest, SavePageSuccessfulWithRequestOrigin) {
@ -432,11 +422,6 @@ TEST_F(OfflinePageModelTaskifiedTest, SavePageSuccessfulWithRequestOrigin) {
EXPECT_EQ(kTestTitle, saved_page_ptr->title);
EXPECT_EQ(kTestUrl2, saved_page_ptr->original_url_if_different);
EXPECT_EQ(kTestRequestOrigin, saved_page_ptr->request_origin);
histogram_tester()->ExpectUniqueSample(
model_utils::AddHistogramSuffix(kTestClientId1.name_space,
"OfflinePages.PageSize"),
kTestFileSize / 1024, 1);
}
TEST_F(OfflinePageModelTaskifiedTest, SavePageOfflineArchiverCancelled) {
@ -445,11 +430,6 @@ TEST_F(OfflinePageModelTaskifiedTest, SavePageOfflineArchiverCancelled) {
SavePageWithExpectedResult(kTestUrl, kTestClientId1,
GURL("http://other.page.com"), kEmptyRequestOrigin,
std::move(archiver), SavePageResult::CANCELLED);
histogram_tester()->ExpectTotalCount(
model_utils::AddHistogramSuffix(kTestClientId1.name_space,
"OfflinePages.PageSize"),
0);
}
TEST_F(OfflinePageModelTaskifiedTest, SavePageOfflineArchiverDeviceFull) {
@ -458,11 +438,6 @@ TEST_F(OfflinePageModelTaskifiedTest, SavePageOfflineArchiverDeviceFull) {
SavePageWithExpectedResult(kTestUrl, kTestClientId1,
GURL("http://other.page.com"), kEmptyRequestOrigin,
std::move(archiver), SavePageResult::DEVICE_FULL);
histogram_tester()->ExpectTotalCount(
model_utils::AddHistogramSuffix(kTestClientId1.name_space,
"OfflinePages.PageSize"),
0);
}
TEST_F(OfflinePageModelTaskifiedTest,
@ -474,11 +449,6 @@ TEST_F(OfflinePageModelTaskifiedTest,
GURL("http://other.page.com"), kEmptyRequestOrigin,
std::move(archiver),
SavePageResult::CONTENT_UNAVAILABLE);
histogram_tester()->ExpectTotalCount(
model_utils::AddHistogramSuffix(kTestClientId1.name_space,
"OfflinePages.PageSize"),
0);
}
TEST_F(OfflinePageModelTaskifiedTest, SavePageOfflineCreationFailed) {
@ -489,11 +459,6 @@ TEST_F(OfflinePageModelTaskifiedTest, SavePageOfflineCreationFailed) {
GURL("http://other.page.com"), kEmptyRequestOrigin,
std::move(archiver),
SavePageResult::ARCHIVE_CREATION_FAILED);
histogram_tester()->ExpectTotalCount(
model_utils::AddHistogramSuffix(kTestClientId1.name_space,
"OfflinePages.PageSize"),
0);
}
TEST_F(OfflinePageModelTaskifiedTest, SavePageOfflineArchiverReturnedWrongUrl) {
@ -502,11 +467,6 @@ TEST_F(OfflinePageModelTaskifiedTest, SavePageOfflineArchiverReturnedWrongUrl) {
SavePageWithExpectedResult(
GURL("http://example.com"), kTestClientId1, GURL("http://other.page.com"),
kEmptyRequestOrigin, std::move(archiver), SavePageResult::INCORRECT_URL);
histogram_tester()->ExpectTotalCount(
model_utils::AddHistogramSuffix(kTestClientId1.name_space,
"OfflinePages.PageSize"),
0);
}
TEST_F(OfflinePageModelTaskifiedTest, SavePageLocalFileFailed) {
@ -514,11 +474,6 @@ TEST_F(OfflinePageModelTaskifiedTest, SavePageLocalFileFailed) {
GURL("http://other.page.com"), kEmptyRequestOrigin,
std::unique_ptr<OfflinePageTestArchiver>(),
SavePageResult::SKIPPED);
histogram_tester()->ExpectTotalCount(
model_utils::AddHistogramSuffix(kTestClientId1.name_space,
"OfflinePages.PageSize"),
0);
}
// This test case is for the scenario that there are two save page requests but
@ -559,11 +514,6 @@ TEST_F(OfflinePageModelTaskifiedTest, SavePageOfflineArchiverTwoPages) {
EXPECT_EQ(1LL, store_test_util()->GetPageCount());
base::FilePath saved_file_path1 = last_path_created_by_archiver();
histogram_tester()->ExpectUniqueSample(
model_utils::AddHistogramSuffix(kTestClientId1.name_space,
"OfflinePages.PageSize"),
kTestFileSize / 1024, 1);
ResetResults();
delayed_archiver_ptr->CompleteCreateArchive();
@ -590,11 +540,6 @@ TEST_F(OfflinePageModelTaskifiedTest, SavePageOfflineArchiverTwoPages) {
EXPECT_EQ(kTestClientId1, saved_page_ptr2->client_id);
EXPECT_EQ(saved_file_path2, saved_page_ptr2->file_path);
EXPECT_EQ(kTestFileSize, saved_page_ptr2->file_size);
histogram_tester()->ExpectUniqueSample(
model_utils::AddHistogramSuffix(kTestClientId1.name_space,
"OfflinePages.PageSize"),
kTestFileSize / 1024, 2);
}
TEST_F(OfflinePageModelTaskifiedTest, SavePageOnBackground) {
@ -1096,8 +1041,6 @@ TEST_F(OfflinePageModelTaskifiedTest, ClearStorage) {
FastForwardBy(run_delay);
EXPECT_EQ(last_scheduling_time, last_maintenance_tasks_schedule_time());
// Check that CleanupVisualsTask ran.
histogram_tester()->ExpectUniqueSample("OfflinePages.CleanupThumbnails.Count",
0, 1);
// Calling GetAllPages after only half of the enforced interval between
// ClearStorage runs should not schedule ClearStorage.
@ -1125,9 +1068,6 @@ TEST_F(OfflinePageModelTaskifiedTest, ClearStorage) {
FastForwardBy(run_delay);
EXPECT_EQ(last_scheduling_time, last_maintenance_tasks_schedule_time());
// Check that CleanupVisualsTask ran only once.
histogram_tester()->ExpectTotalCount("OfflinePages.CleanupThumbnails.Count",
1);
}
// This test is affected by https://crbug.com/725685, which only affects windows
@ -1144,16 +1084,12 @@ TEST_F(OfflinePageModelTaskifiedTest,
// The PersistentPageConsistencyCheckTask should not be executed based on time
// delays after launch (aka the model being built).
FastForwardBy(base::Days(1));
histogram_tester()->ExpectTotalCount(
"OfflinePages.ConsistencyCheck.Persistent.Result", 0);
// GetAllPages should schedule a delayed task that will eventually run
// PersistentPageConsistencyCheck.
base::MockCallback<MultipleOfflinePageItemCallback> callback;
model()->GetAllPages(callback.Get());
PumpLoop();
histogram_tester()->ExpectTotalCount(
"OfflinePages.ConsistencyCheck.Persistent.Result", 0);
// Add a persistent page with file.
page_generator()->SetNamespace(kDownloadNamespace);
@ -1174,8 +1110,6 @@ TEST_F(OfflinePageModelTaskifiedTest,
EXPECT_EQ(1UL,
test_utils::GetFileCountInDirectory(public_archive_dir_path()));
EXPECT_EQ(1LL, store_test_util()->GetPageCount());
histogram_tester()->ExpectTotalCount(
"OfflinePages.ConsistencyCheck.Persistent.Result", 1);
// Delete the file associated with |page|, so the next time when the
// consistency check is executed, the page will be marked as hidden.
@ -1189,9 +1123,6 @@ TEST_F(OfflinePageModelTaskifiedTest,
model()->GetAllPages(callback.Get());
// And advance the delay too.
FastForwardBy(run_delay);
// Confirm no persistent page consistency check is executed.
histogram_tester()->ExpectTotalCount(
"OfflinePages.ConsistencyCheck.Persistent.Result", 1);
// Forwarding by the full interval (plus 1 second just in case) should allow
// the task to be enqueued again and call GetAllPages again to enqueue the
@ -1209,8 +1140,6 @@ TEST_F(OfflinePageModelTaskifiedTest,
auto actual_page = store_test_util()->GetPageByOfflineId(page.offline_id);
ASSERT_TRUE(actual_page);
EXPECT_NE(base::Time(), actual_page->file_missing_time);
histogram_tester()->ExpectTotalCount(
"OfflinePages.ConsistencyCheck.Persistent.Result", 2);
// Forwarding by a long time that is enough for the page with missing file to
// get expired.
@ -1230,8 +1159,6 @@ TEST_F(OfflinePageModelTaskifiedTest,
EXPECT_EQ(1LL, store_test_util()->GetPageCount());
EXPECT_EQ(page.system_download_id,
publisher()->last_removed_id().download_id);
histogram_tester()->ExpectTotalCount(
"OfflinePages.ConsistencyCheck.Persistent.Result", 3);
}
TEST_F(OfflinePageModelTaskifiedTest, MaintenanceTasksAreDisabled) {
@ -1253,12 +1180,6 @@ TEST_F(OfflinePageModelTaskifiedTest, MaintenanceTasksAreDisabled) {
// Advance the clock considerably and confirm no runs happened.
FastForwardBy(base::Days(1));
EXPECT_EQ(base::Time(), last_maintenance_tasks_schedule_time());
histogram_tester()->ExpectTotalCount(
"OfflinePages.ConsistencyCheck.Temporary.Result", 0);
histogram_tester()->ExpectTotalCount(
"OfflinePages.ConsistencyCheck.Persistent.Result", 0);
histogram_tester()->ExpectTotalCount("OfflinePages.CleanupThumbnails.Count",
0);
}
TEST_F(OfflinePageModelTaskifiedTest, StoreAndCheckThumbnail) {

@ -166,8 +166,6 @@ void PersistentPageConsistencyCheckTask::Run() {
void PersistentPageConsistencyCheckTask::OnPersistentPageConsistencyCheckDone(
CheckResult check_result) {
UMA_HISTOGRAM_ENUMERATION("OfflinePages.ConsistencyCheck.Persistent.Result",
check_result.result);
// If sync operation failed, invoke the callback with an empty list of
// download ids.
if (check_result.result != SyncOperationResult::SUCCESS) {

@ -107,10 +107,6 @@ TEST_F(PersistentPageConsistencyCheckTaskTest,
EXPECT_FALSE(store_test_util()->GetPageByOfflineId(page5.offline_id));
EXPECT_TRUE(store_test_util()->GetPageByOfflineId(page6.offline_id));
EXPECT_FALSE(IsPageMissingFile(page6));
histogram_tester()->ExpectUniqueSample(
"OfflinePages.ConsistencyCheck.Persistent.Result",
static_cast<int>(SyncOperationResult::SUCCESS), 1);
}
#if BUILDFLAG(IS_WIN)
@ -142,9 +138,6 @@ TEST_F(PersistentPageConsistencyCheckTaskTest,
store(), archive_manager(), base::Time::Now(), callback.Get()));
EXPECT_FALSE(store_test_util()->GetPageByOfflineId(page.offline_id));
histogram_tester()->ExpectUniqueSample(
"OfflinePages.ConsistencyCheck.Persistent.Result",
static_cast<int>(SyncOperationResult::SUCCESS), 1);
}
} // namespace offline_pages

@ -212,13 +212,10 @@ bool StartupMaintenanceSync(
sql::Database* db) {
// Clear temporary pages that are in legacy directory, which is also the
// directory that serves as the 'private' directory.
SyncOperationResult result =
ClearLegacyPagesInPrivateDirSync(db, private_archives_dir);
ClearLegacyPagesInPrivateDirSync(db, private_archives_dir);
// Clear temporary pages in cache directory.
result = CheckTemporaryPageConsistencySync(db, temporary_archives_dir);
UMA_HISTOGRAM_ENUMERATION("OfflinePages.ConsistencyCheck.Temporary.Result",
result);
CheckTemporaryPageConsistencySync(db, temporary_archives_dir);
// Report storage usage UMA, |temporary_namespaces| + |persistent_namespaces|
// should be all namespaces. This is implicitly checked by the

@ -153,10 +153,6 @@ TEST_F(StartupMaintenanceTaskTest, MAYBE_TestDeleteFileWithoutDbEntry) {
EXPECT_EQ(PagePresence::BOTH_DB_AND_FILESYSTEM,
CheckPagePresence(persistent_page1));
EXPECT_EQ(PagePresence::NONE, CheckPagePresence(persistent_page2));
histogram_tester()->ExpectUniqueSample(
"OfflinePages.ConsistencyCheck.Temporary.Result",
static_cast<int>(SyncOperationResult::SUCCESS), 1);
}
// This test is affected by https://crbug.com/725685, which only affects windows
@ -200,10 +196,6 @@ TEST_F(StartupMaintenanceTaskTest, MAYBE_TestDeleteDbEntryWithoutFile) {
EXPECT_EQ(PagePresence::BOTH_DB_AND_FILESYSTEM,
CheckPagePresence(persistent_page1));
EXPECT_EQ(PagePresence::DB_ONLY, CheckPagePresence(persistent_page2));
histogram_tester()->ExpectUniqueSample(
"OfflinePages.ConsistencyCheck.Temporary.Result",
static_cast<int>(SyncOperationResult::SUCCESS), 1);
}
// This test is affected by https://crbug.com/725685, which only affects windows
@ -257,10 +249,6 @@ TEST_F(StartupMaintenanceTaskTest, MAYBE_CombinedTest) {
EXPECT_EQ(PagePresence::BOTH_DB_AND_FILESYSTEM,
CheckPagePresence(persistent_page1));
EXPECT_EQ(PagePresence::NONE, CheckPagePresence(persistent_page2));
histogram_tester()->ExpectUniqueSample(
"OfflinePages.ConsistencyCheck.Temporary.Result",
static_cast<int>(SyncOperationResult::SUCCESS), 1);
}
TEST_F(StartupMaintenanceTaskTest, TestKeepingNonMhtmlFile) {

@ -36,10 +36,6 @@ namespace {
// it can be used inline in other SQL statements below.
#define OFFLINE_PAGES_TABLE_NAME "offlinepages_v1"
void ReportStoreEvent(OfflinePagesStoreEvent event) {
UMA_HISTOGRAM_ENUMERATION("OfflinePages.SQLStorage.StoreEvent", event);
}
bool CreateOfflinePagesTable(sql::Database* db) {
static const char kCreateLatestOfflinePagesTableSql[] =
"CREATE TABLE IF NOT EXISTS " OFFLINE_PAGES_TABLE_NAME
@ -397,9 +393,6 @@ StoreState OfflinePageMetadataStore::GetStateForTesting() const {
void OfflinePageMetadataStore::OnOpenStart(base::TimeTicks last_closing_time) {
TRACE_EVENT_ASYNC_BEGIN1("offline_pages", "Metadata Store", this, "is reopen",
!last_closing_time.is_null());
ReportStoreEvent(last_closing_time.is_null()
? OfflinePagesStoreEvent::kOpenedFirstTime
: OfflinePagesStoreEvent::kReopened);
}
void OfflinePageMetadataStore::OnOpenDone(bool success) {
@ -432,12 +425,9 @@ void OfflinePageMetadataStore::OnTaskReturnComplete() {
void OfflinePageMetadataStore::OnCloseStart(
InitializationStatus status_before_close) {
if (status_before_close != InitializationStatus::kSuccess) {
ReportStoreEvent(OfflinePagesStoreEvent::kCloseSkipped);
return;
}
TRACE_EVENT_ASYNC_STEP_PAST0("offline_pages", "Metadata Store", this, "Open");
ReportStoreEvent(OfflinePagesStoreEvent::kClosed);
}
void OfflinePageMetadataStore::OnCloseComplete() {

@ -2270,9 +2270,7 @@ chromium-metrics-reviews@google.com.
<suffix name="last_n" label="Offline recent pages"/>
<suffix name="ntp_suggestions" label="NTP suggestions offlined by the user"/>
<suffix name="suggested_articles" label="Prefetched NTP suggestions"/>
<affected-histogram name="OfflinePages.Background.LoadingErrorStatusCode"/>
<affected-histogram name="OfflinePages.PageAccessInterval"/>
<affected-histogram name="OfflinePages.PageSize"/>
</histogram_suffixes>
<histogram_suffixes name="OmniboxClipboardSuggestionType" separator=".">

@ -96,15 +96,6 @@ chromium-metrics-reviews@google.com.
</summary>
</histogram>
<histogram name="OfflinePages.Background.LoadingErrorStatusCode"
enum="CombinedHttpResponseAndNetErrorCode" expires_after="2021-06-25">
<owner>chili@chromium.org</owner>
<owner>offline-dev@chromium.org</owner>
<summary>
The combined http and net error codes that caused a page load failure.
</summary>
</histogram>
<histogram name="OfflinePages.CachedOfflineStatusValid" enum="BooleanMatched"
expires_after="2024-05-26">
<owner>pnoland@chromium.org</owner>
@ -116,27 +107,6 @@ chromium-metrics-reviews@google.com.
</summary>
</histogram>
<histogram name="OfflinePages.CleanupThumbnails.Count" units="thumbnails"
expires_after="2021-06-25">
<owner>harringtond@chromium.org</owner>
<owner>offline-dev@chromium.org</owner>
<summary>Number of thumbnails removed by the thumbnail cleanup task.</summary>
</histogram>
<histogram name="OfflinePages.ConsistencyCheck.Persistent.Result"
enum="OfflinePagesSyncOperationResult" expires_after="2021-06-25">
<owner>dimich@chromium.org</owner>
<owner>offline-dev@chromium.org</owner>
<summary>Result of persistent page consistency check.</summary>
</histogram>
<histogram name="OfflinePages.ConsistencyCheck.Temporary.Result"
enum="OfflinePagesSyncOperationResult" expires_after="2021-06-25">
<owner>dimich@chromium.org</owner>
<owner>offline-dev@chromium.org</owner>
<summary>Result of temporary page consistency check.</summary>
</histogram>
<histogram name="OfflinePages.DidNavigationThrottleCancelNavigation"
enum="Boolean" expires_after="2024-05-19">
<owner>curranmax@chromium.org</owner>
@ -153,19 +123,6 @@ chromium-metrics-reviews@google.com.
</summary>
</histogram>
<histogram name="OfflinePages.LastN.IsSavingSamePage"
enum="OfflinePagesLastNIsSavingSamePageEnum" expires_after="2021-05-31">
<owner>sclittle@chromium.org</owner>
<owner>offline-dev@chromium.org</owner>
<summary>
Upon starting saving a new last_n offline page snapshot, report if that is
being done for a page that is new (a navigation happened) or for one that
has been previously saved in the same session (no navigation happened). This
metric will assist in determining if there is the need to better track
actual content changes in pages saved more than once by last_n.
</summary>
</histogram>
<histogram name="OfflinePages.OfflineUsage" enum="OfflinePagesOfflineUsage"
expires_after="2023-08-13">
<owner>dimich@chromium.org</owner>
@ -207,33 +164,6 @@ chromium-metrics-reviews@google.com.
</summary>
</histogram>
<histogram base="true" name="OfflinePages.PageSize" units="KB"
expires_after="2021-06-25">
<owner>jianli@chromium.org</owner>
<owner>offline-dev@chromium.org</owner>
<summary>Size of the saved copy of an offline page.</summary>
</histogram>
<histogram name="OfflinePages.SQLStorage.StoreEvent"
enum="OfflinePagesStoreEvent" expires_after="2021-06-25">
<owner>sclittle@chromium.org</owner>
<owner>offline-dev@chromium.org</owner>
<summary>
Used as a counter to track different events related to offline page store
inner working.
</summary>
</histogram>
<histogram name="OfflinePages.TrustStateOnOpen" enum="OfflinePageTrustedState"
expires_after="2021-06-25">
<owner>sclittle@chromium.org</owner>
<owner>offline-dev@chromium.org</owner>
<summary>
The trust state of the offline page. This is recorded when an offline page
is being opened.
</summary>
</histogram>
<histogram name="OfflinePages.WebsiteSettings.OpenOnlineButtonVisible"
enum="BooleanVisible" expires_after="M77">
<owner>fgorski@chromium.org</owner>