blob: 9bb553178468d82963c94a8d8b7e89e5d465d802 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
|
// 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.
#include "ios/chrome/common/app_group/app_group_metrics.h"
#include "base/logging.h"
namespace app_group {
NSString* const kPendingLogFileSuffix = @"_PendingLog";
NSString* const kPendingLogFileDirectory = @"ExtensionLogs";
// To avoid collision between session_ids from chrome or external components,
// the session ID is offset depending on the application.
int AppGroupSessionID(int session_id, AppGroupApplications application) {
DCHECK_LT(session_id, 1 << 23);
return (1 << 23) * static_cast<int>(application) + session_id;
}
} // namespace app_group
|