Bug 1412218 - Add telemetry probe for how many users with legacy cookie files. r=jdm, data-r=francois

This commit is contained in:
Junior Hsu 2017-11-05 17:48:36 -05:00
parent ee320f219e
commit e0ae5de7ef
2 changed files with 12 additions and 0 deletions

View File

@ -1338,6 +1338,8 @@ nsCookieService::TryInitDB(bool aRecreateDB)
// No more upgrades. Update the schema version.
rv = mDefaultDBState->syncConn->SetSchemaVersion(COOKIES_SCHEMA_VERSION);
NS_ENSURE_SUCCESS(rv, RESULT_RETRY);
Telemetry::Accumulate(Telemetry::MOZ_SQLITE_COOKIES_OLD_SCHEMA, dbSchemaVersion);
MOZ_FALLTHROUGH;
case COOKIES_SCHEMA_VERSION:
@ -1429,6 +1431,7 @@ nsCookieService::TryInitDB(bool aRecreateDB)
gCookieService->ImportCookies(oldCookieFile);
oldCookieFile->Remove(false);
gCookieService->mDBState = initialState;
Telemetry::Accumulate(Telemetry::MOZ_SQLITE_COOKIES_OLD_SCHEMA, 0);
});
NS_DispatchToMainThread(runnable);

View File

@ -4426,6 +4426,15 @@
"n_buckets": 10,
"description": "Time spent on SQLite read() (ms) *** No longer needed (bug 1156565). Delete histogram and accumulation code! ***"
},
"MOZ_SQLITE_COOKIES_OLD_SCHEMA": {
"record_in_processes": ["main"],
"expires_in_version": "62",
"kind": "enumerated",
"n_values": 10,
"bug_numbers": [1412218],
"alert_emails": ["necko@mozilla.com", "junior@mozilla.com"],
"description": "Old schema version of the cookie database. 0 for having legacy cookies.txt."
},
"MOZ_SQLITE_COOKIES_BLOCK_MAIN_THREAD_MS": {
"record_in_processes": ["main"],
"expires_in_version": "never",