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