1
0
mirror of https://github.com/bitwarden/browser synced 2025-12-22 11:13:46 +00:00

move google analytics to measurements protocol so that we can get rid of custom CSP

This commit is contained in:
Kyle Spearrin
2016-10-17 22:26:04 -04:00
parent 293308b8bb
commit 56bd98fa43
5 changed files with 57 additions and 20 deletions

View File

@@ -8,10 +8,18 @@ function initAppIdService() {
throw 'callback function required';
}
makeAndGetAppId('appId');
makeAndGetAppId('appId', callback);
};
function makeAndGetAppId(key) {
AppIdService.prototype.getAnonymousAppId = function (callback) {
if (!callback || typeof callback !== 'function') {
throw 'callback function required';
}
makeAndGetAppId('anonymousAppId', callback);
};
function makeAndGetAppId(key, callback) {
chrome.storage.local.get(key, function (obj) {
if (obj && obj[key]) {
callback(obj[key]);