1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
5 #ifndef IOS_CHROME_COMMON_APP_GROUP_APP_GROUP_METRICS_MAINAPP_H_
6 #define IOS_CHROME_COMMON_APP_GROUP_APP_GROUP_METRICS_MAINAPP_H_
8 #import <Foundation/Foundation.h>
10 #include "base/basictypes.h"
11 #include "base/mac/scoped_block.h"
12 #include "ios/chrome/common/app_group/app_group_constants.h"
16 typedef void (^ProceduralBlockWithData
)(NSData
*);
18 // These methods must be called from the Chrome app.
21 // Iterates through the extensions pending logs and deletes them.
22 // Calls |callback| on each log before deleting.
23 void ProcessPendingLogs(
24 const base::mac::ScopedBlock
<ProceduralBlockWithData
>& callback
);
26 // Enables the metrics collecting in extensions. The extensions will
27 // use |clientID| as client ID, and |brandCode| as brand code in the logs.
28 void EnableMetrics(NSString
* client_id
,
31 int64 enableMetricsDate
);
33 // Disabled the metrics collecting in extensions.
34 void DisableMetrics();
36 } // namespace main_app
37 } // namespace app_group
39 #endif // IOS_CHROME_COMMON_APP_GROUP_APP_GROUP_METRICS_MAINAPP_H_