Roll src/third_party/WebKit 06cb9e9:a978ee5 (svn 202558:202559)
[chromium-blink-merge.git] / ios / chrome / common / app_group / app_group_metrics_mainapp.h
blob1690c79401067f475b3ef61cc624d7946edad996
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"
14 namespace app_group {
16 typedef void (^ProceduralBlockWithData)(NSData*);
18 // These methods must be called from the Chrome app.
19 namespace main_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,
29 NSString* brand_code,
30 int64 installDate,
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_