-
Notifications
You must be signed in to change notification settings - Fork 121
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
…#3392) Refer to the original PR: #3340 b/331208101 Change-Id: Ic17c4e47aaa5c1c23869e0ce8d5a7a3e69d763ae Co-authored-by: yuying-y <[email protected]>
- Loading branch information
1 parent
e39b52c
commit 5429e94
Showing
15 changed files
with
203 additions
and
24 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
// Copyright 2024 The Cobalt Authors. All Rights Reserved. | ||
// | ||
// Licensed under the Apache License, Version 2.0 (the "License"); | ||
// you may not use this file except in compliance with the License. | ||
// You may obtain a copy of the License at | ||
// | ||
// http://www.apache.org/licenses/LICENSE-2.0 | ||
// | ||
// Unless required by applicable law or agreed to in writing, software | ||
// distributed under the License is distributed on an "AS IS" BASIS, | ||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
// See the License for the specific language governing permissions and | ||
// limitations under the License. | ||
|
||
#include "starboard/loader_app/record_loader_app_status.h" | ||
|
||
#include <cstring> | ||
|
||
#include "starboard/system.h" | ||
|
||
namespace starboard { | ||
namespace loader_app { | ||
|
||
void RecordSlotSelectionStatus(SlotSelectionStatus status) { | ||
auto metrics_extension = | ||
static_cast<const StarboardExtensionLoaderAppMetricsApi*>( | ||
SbSystemGetExtension(kStarboardExtensionLoaderAppMetricsName)); | ||
if (metrics_extension && | ||
strcmp(metrics_extension->name, | ||
kStarboardExtensionLoaderAppMetricsName) == 0 && | ||
metrics_extension->version >= 3) { | ||
metrics_extension->SetSlotSelectionStatus(status); | ||
} | ||
} | ||
|
||
} // namespace loader_app | ||
} // namespace starboard |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
// Copyright 2024 The Cobalt Authors. All Rights Reserved. | ||
// | ||
// Licensed under the Apache License, Version 2.0 (the "License"); | ||
// you may not use this file except in compliance with the License. | ||
// You may obtain a copy of the License at | ||
// | ||
// http://www.apache.org/licenses/LICENSE-2.0 | ||
// | ||
// Unless required by applicable law or agreed to in writing, software | ||
// distributed under the License is distributed on an "AS IS" BASIS, | ||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
// See the License for the specific language governing permissions and | ||
// limitations under the License. | ||
|
||
#ifndef STARBOARD_LOADER_APP_RECORD_LOADER_APP_STATUS_H_ | ||
#define STARBOARD_LOADER_APP_RECORD_LOADER_APP_STATUS_H_ | ||
|
||
#include <string> | ||
|
||
#include "starboard/extension/loader_app_metrics.h" | ||
|
||
namespace starboard { | ||
namespace loader_app { | ||
|
||
// Persist the slot selection status so that it can be read in the Cobalt layer | ||
void RecordSlotSelectionStatus(SlotSelectionStatus status); | ||
|
||
} // namespace loader_app | ||
} // namespace starboard | ||
|
||
#endif // STARBOARD_LOADER_APP_RECORD_LOADER_APP_STATUS_H_ |
Oops, something went wrong.