blob: 2ced3613d5e2cbad5427b03fc2063a6e5a863923 [file] [log] [blame]
// Copyright 2015 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#ifndef IOS_CHROME_COMMON_APP_GROUP_APP_GROUP_METRICS_MAINAPP_H_
#define IOS_CHROME_COMMON_APP_GROUP_APP_GROUP_METRICS_MAINAPP_H_
#import <Foundation/Foundation.h>
#include <stdint.h>
#include "ios/chrome/common/app_group/app_group_constants.h"
namespace app_group {
typedef void (^ProceduralBlockWithData)(NSData*);
// These methods must be called from the Chrome app.
namespace main_app {
// Send histograms reporting the usage of notification center metrics.
void RecordWidgetUsage();
// Iterates through the extensions pending logs and deletes them.
// Calls |callback| on each log before deleting.
// TODO(crbug.com/782685): remove function.
void ProcessPendingLogs(ProceduralBlockWithData callback);
// Enables the metrics collecting in extensions. The extensions will
// use |clientID| as client ID, and |brandCode| as brand code in the logs.
// TODO(crbug.com/782685): remove function.
void EnableMetrics(NSString* client_id,
NSString* brand_code,
int64_t installDate,
int64_t enableMetricsDate);
// Disables the metrics collecting in extensions.
// TODO(crbug.com/782685): remove function.
void DisableMetrics();
} // namespace main_app
} // namespace app_group
#endif // IOS_CHROME_COMMON_APP_GROUP_APP_GROUP_METRICS_MAINAPP_H_