Skip to content

Add User Messaging Platform iOS support #1412

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 30 commits into from
Aug 18, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
30 commits
Select commit Hold shift + click to select a range
652bb7e
Add iOS files, copies of stubs for now.
jonsimantov Aug 3, 2023
246ab64
Format code.
jonsimantov Aug 3, 2023
8f54fad
Update cocoapod versions and add UMP pod.
jonsimantov Aug 3, 2023
22a684f
Merge branch 'feature_branch/ump-sdk' into feature/ump-sdk-ios
jonsimantov Aug 8, 2023
77384f5
Add iOS basics, also rename two enums.
jonsimantov Aug 9, 2023
6be9f7c
Fixes.
jonsimantov Aug 9, 2023
37b9d32
Format code.
jonsimantov Aug 10, 2023
3a46e8c
Merge branch 'feature/ump-sdk-ios' of https://github.com/firebase/fir…
jonsimantov Aug 10, 2023
c6d98d3
Fix compiler errors.
jonsimantov Aug 10, 2023
063d678
Add test flag for skipping on hardware.
jonsimantov Aug 11, 2023
7ea9f64
Fix iOS implementation and tests to match actual results.
jonsimantov Aug 15, 2023
68a1698
Format code and add general GMA tests back in.
jonsimantov Aug 15, 2023
08f5fa5
Merge branch 'feature_branch/ump-sdk' into feature/ump-sdk-ios
jonsimantov Aug 15, 2023
de1f488
Enable App Transparency for iOS app.
jonsimantov Aug 15, 2023
57f9399
Merge branch 'feature/ump-sdk-ios' of https://github.com/firebase/fir…
jonsimantov Aug 15, 2023
a730f83
Add debug device ID to test framework on iOS.
jonsimantov Aug 16, 2023
2438a12
Change tests that use debug IDs to work differently.
jonsimantov Aug 16, 2023
2cba298
Add debug ID to certain tests.
jonsimantov Aug 16, 2023
a705ec5
Format code.
jonsimantov Aug 16, 2023
d169883
Format code.
jonsimantov Aug 16, 2023
454bd7e
Add a mutex to prevent race condition.
jonsimantov Aug 16, 2023
47408f6
Update test to check race condition.
jonsimantov Aug 16, 2023
bdd4c57
Add include for lint
jonsimantov Aug 16, 2023
da70121
Update test name.
jonsimantov Aug 16, 2023
b85feb3
Remove user interaction flag from debug test.
jonsimantov Aug 16, 2023
453d3f8
Format code.
jonsimantov Aug 16, 2023
d7ee1e1
Remove UMP-only test mode.
jonsimantov Aug 16, 2023
a99c762
Remove unnecessary test stuff.
jonsimantov Aug 17, 2023
e147305
Fix assert.
jonsimantov Aug 17, 2023
7a03dd9
Fix stub to match iOS flow.
jonsimantov Aug 17, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion gma/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ set(android_SRCS

# Source files used by the iOS implementation.
set(ios_SRCS
src/stub/ump/consent_info_internal_stub.cc
src/ios/ump/consent_info_internal_ios.mm
src/ios/FADAdSize.mm
src/ios/FADAdView.mm
src/ios/FADInterstitialDelegate.mm
Expand Down Expand Up @@ -133,11 +133,13 @@ elseif(IOS)
firebase_gma
POD_NAMES
Google-Mobile-Ads-SDK
GoogleUserMessagingPlatform
)

# GMA expects the header files to be in a subfolder, so set up a symlink to
# accomplish that.
symlink_pod_headers(firebase_gma Google-Mobile-Ads-SDK GoogleMobileAds)
symlink_pod_headers(firebase_gma GoogleUserMessagingPlatform UserMessagingPlatform)

if (FIREBASE_XCODE_TARGET_FORMAT STREQUAL "frameworks")
set_target_properties(firebase_gma PROPERTIES
Expand Down
2 changes: 2 additions & 0 deletions gma/integration_test/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@
<true/>
<key>UILaunchStoryboardName</key>
<string>LaunchScreen</string>
<key>NSUserTrackingUsageDescription</key>
<string>This identifier will be used to deliver personalized ads to you.</string>
<key>CFBundleURLTypes</key>
<array>
<dict>
Expand Down
1 change: 1 addition & 0 deletions gma/integration_test/Podfile
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ use_frameworks! :linkage => :static
target 'integration_test' do
pod 'Firebase/CoreOnly', '10.13.0'
pod 'Google-Mobile-Ads-SDK', '10.9.0'
pod 'GoogleUserMessagingPlatform', '2.1.0'
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Any changes need to be done to the update scripts so this gets updated automatically?

end

post_install do |installer|
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
D640F3172819C85800AC956E /* empty.swift in Sources */ = {isa = PBXBuildFile; fileRef = D640F3162819C85800AC956E /* empty.swift */; };
D66B16871CE46E8900E5638A /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = D66B16861CE46E8900E5638A /* LaunchScreen.storyboard */; };
D67D355822BABD2200292C1D /* gtest-all.cc in Sources */ = {isa = PBXBuildFile; fileRef = D67D355622BABD2100292C1D /* gtest-all.cc */; };
D686A3292A8B16F20034845A /* AppTrackingTransparency.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = D686A3282A8B16F20034845A /* AppTrackingTransparency.framework */; };
D6C179E922CB322900C2651A /* ios_app_framework.mm in Sources */ = {isa = PBXBuildFile; fileRef = D6C179E722CB322900C2651A /* ios_app_framework.mm */; };
D6C179EA22CB322900C2651A /* ios_firebase_test_framework.mm in Sources */ = {isa = PBXBuildFile; fileRef = D6C179E822CB322900C2651A /* ios_firebase_test_framework.mm */; };
D6C179EE22CB323300C2651A /* firebase_test_framework.cc in Sources */ = {isa = PBXBuildFile; fileRef = D6C179EC22CB323300C2651A /* firebase_test_framework.cc */; };
Expand All @@ -39,6 +40,7 @@
D66B16861CE46E8900E5638A /* LaunchScreen.storyboard */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.storyboard; path = LaunchScreen.storyboard; sourceTree = "<group>"; };
D67D355622BABD2100292C1D /* gtest-all.cc */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = "gtest-all.cc"; path = "external/googletest/src/googletest/src/gtest-all.cc"; sourceTree = "<group>"; };
D67D355722BABD2100292C1D /* gtest.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = gtest.h; path = external/googletest/src/googletest/include/gtest/gtest.h; sourceTree = "<group>"; };
D686A3282A8B16F20034845A /* AppTrackingTransparency.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AppTrackingTransparency.framework; path = System/Library/Frameworks/AppTrackingTransparency.framework; sourceTree = SDKROOT; };
D6C179E722CB322900C2651A /* ios_app_framework.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; name = ios_app_framework.mm; path = src/ios/ios_app_framework.mm; sourceTree = "<group>"; };
D6C179E822CB322900C2651A /* ios_firebase_test_framework.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; name = ios_firebase_test_framework.mm; path = src/ios/ios_firebase_test_framework.mm; sourceTree = "<group>"; };
D6C179EB22CB323300C2651A /* firebase_test_framework.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = firebase_test_framework.h; path = src/firebase_test_framework.h; sourceTree = "<group>"; };
Expand All @@ -53,6 +55,7 @@
buildActionMask = 2147483647;
files = (
529226D81C85F68000C89379 /* CoreGraphics.framework in Frameworks */,
D686A3292A8B16F20034845A /* AppTrackingTransparency.framework in Frameworks */,
529226DA1C85F68000C89379 /* UIKit.framework in Frameworks */,
529226D61C85F68000C89379 /* Foundation.framework in Frameworks */,
);
Expand Down Expand Up @@ -85,6 +88,7 @@
529226D41C85F68000C89379 /* Frameworks */ = {
isa = PBXGroup;
children = (
D686A3282A8B16F20034845A /* AppTrackingTransparency.framework */,
529226D51C85F68000C89379 /* Foundation.framework */,
529226D71C85F68000C89379 /* CoreGraphics.framework */,
529226D91C85F68000C89379 /* UIKit.framework */,
Expand Down
137 changes: 110 additions & 27 deletions gma/integration_test/src/integration_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,8 @@ const char* kErrorDomain = "com.google.admob";
#endif

// Sample test device IDs to use in making the request.
// You can replace these with actual device IDs for certain tests (e.g. UMP)
// to work on hardware devices.
const std::vector<std::string> kTestDeviceIDs = {
"2077ef9a63d2b398840261c8221a0c9b", "098fe087d987c9a878965454a65654d7"};

Expand Down Expand Up @@ -136,6 +138,7 @@ static const std::vector<std::string> kNeighboringContentURLs = {
"test_url1", "test_url2", "test_url3"};

using app_framework::LogDebug;
using app_framework::LogInfo;
using app_framework::LogWarning;
using app_framework::ProcessEvents;

Expand Down Expand Up @@ -2498,6 +2501,7 @@ void FirebaseGmaUmpTest::InitializeUmp(ResetOption reset) {

void FirebaseGmaUmpTest::TerminateUmp() {
if (consent_info_) {
consent_info_->Reset();
delete consent_info_;
consent_info_ = nullptr;
}
Expand Down Expand Up @@ -2591,6 +2595,8 @@ TEST_F(FirebaseGmaUmpTest, TestUmpRequestConsentInfoUpdateDebugEEA) {
params.tag_for_under_age_of_consent = false;
params.debug_settings.debug_geography =
firebase::gma::ump::kConsentDebugGeographyEEA;
params.debug_settings.debug_device_ids = kTestDeviceIDs;
params.debug_settings.debug_device_ids.push_back(GetDebugDeviceId());

firebase::Future<void> future =
consent_info_->RequestConsentInfoUpdate(params);
Expand All @@ -2610,6 +2616,8 @@ TEST_F(FirebaseGmaUmpTest, TestUmpRequestConsentInfoUpdateDebugNonEEA) {
params.tag_for_under_age_of_consent = false;
params.debug_settings.debug_geography =
firebase::gma::ump::kConsentDebugGeographyNonEEA;
params.debug_settings.debug_device_ids = kTestDeviceIDs;
params.debug_settings.debug_device_ids.push_back(GetDebugDeviceId());

firebase::Future<void> future =
consent_info_->RequestConsentInfoUpdate(params);
Expand All @@ -2630,6 +2638,8 @@ TEST_F(FirebaseGmaUmpTest, TestUmpLoadForm) {
params.tag_for_under_age_of_consent = false;
params.debug_settings.debug_geography =
firebase::gma::ump::kConsentDebugGeographyEEA;
params.debug_settings.debug_device_ids = kTestDeviceIDs;
params.debug_settings.debug_device_ids.push_back(GetDebugDeviceId());

WaitForCompletion(consent_info_->RequestConsentInfoUpdate(params),
"RequestConsentInfoUpdate");
Expand Down Expand Up @@ -2663,6 +2673,8 @@ TEST_F(FirebaseGmaUmpTest, TestUmpShowForm) {
params.tag_for_under_age_of_consent = false;
params.debug_settings.debug_geography =
firebase::gma::ump::kConsentDebugGeographyEEA;
params.debug_settings.debug_device_ids = kTestDeviceIDs;
params.debug_settings.debug_device_ids.push_back(GetDebugDeviceId());

WaitForCompletion(consent_info_->RequestConsentInfoUpdate(params),
"RequestConsentInfoUpdate");
Expand All @@ -2678,7 +2690,8 @@ TEST_F(FirebaseGmaUmpTest, TestUmpShowForm) {
EXPECT_EQ(consent_info_->GetConsentFormStatus(),
firebase::gma::ump::kConsentFormStatusAvailable);

firebase::Future<void> future = consent_info_->ShowConsentForm(nullptr);
firebase::Future<void> future =
consent_info_->ShowConsentForm(app_framework::GetWindowController());

EXPECT_TRUE(future == consent_info_->ShowConsentFormLastResult());

Expand All @@ -2688,9 +2701,7 @@ TEST_F(FirebaseGmaUmpTest, TestUmpShowForm) {
firebase::gma::ump::kConsentStatusObtained);
}

TEST_F(FirebaseGmaUmpTest, TestUmpLoadFormUnavailableDueUnderAgeOfConsent) {
TEST_REQUIRES_USER_INTERACTION;

TEST_F(FirebaseGmaUmpTest, TestUmpLoadFormUnavailableDueToUnderAgeOfConsent) {
using firebase::gma::ump::ConsentDebugSettings;
using firebase::gma::ump::ConsentFormStatus;
using firebase::gma::ump::ConsentRequestParameters;
Expand All @@ -2700,24 +2711,65 @@ TEST_F(FirebaseGmaUmpTest, TestUmpLoadFormUnavailableDueUnderAgeOfConsent) {
params.tag_for_under_age_of_consent = true;
params.debug_settings.debug_geography =
firebase::gma::ump::kConsentDebugGeographyEEA;
params.debug_settings.debug_device_ids = kTestDeviceIDs;
params.debug_settings.debug_device_ids.push_back(GetDebugDeviceId());

WaitForCompletion(consent_info_->RequestConsentInfoUpdate(params),
"RequestConsentInfoUpdate");

EXPECT_EQ(consent_info_->GetConsentStatus(),
firebase::gma::ump::kConsentStatusRequired);
WaitForCompletion(consent_info_->LoadConsentForm(), "LoadConsentForm",
firebase::gma::ump::kConsentFormErrorUnavailable);
}

EXPECT_EQ(consent_info_->GetConsentFormStatus(),
firebase::gma::ump::kConsentFormStatusUnavailable);
TEST_F(FirebaseGmaUmpTest, TestUmpLoadFormUnavailableDebugNonEEA) {
using firebase::gma::ump::ConsentDebugSettings;
using firebase::gma::ump::ConsentFormStatus;
using firebase::gma::ump::ConsentRequestParameters;
using firebase::gma::ump::ConsentStatus;

ConsentRequestParameters params;
params.tag_for_under_age_of_consent = false;
params.debug_settings.debug_geography =
firebase::gma::ump::kConsentDebugGeographyNonEEA;
params.debug_settings.debug_device_ids = kTestDeviceIDs;
params.debug_settings.debug_device_ids.push_back(GetDebugDeviceId());

WaitForCompletion(consent_info_->RequestConsentInfoUpdate(params),
"RequestConsentInfoUpdate");

WaitForCompletion(consent_info_->LoadConsentForm(), "LoadConsentForm",
firebase::gma::ump::kConsentFormErrorUnavailable);
}

EXPECT_EQ(consent_info_->GetConsentFormStatus(),
firebase::gma::ump::kConsentFormStatusUnavailable);
TEST_F(FirebaseGmaUmpTest, TestUmpLoadAndShowIfRequiredDebugNonEEA) {
using firebase::gma::ump::ConsentDebugSettings;
using firebase::gma::ump::ConsentRequestParameters;
using firebase::gma::ump::ConsentStatus;

ConsentRequestParameters params;
params.tag_for_under_age_of_consent = false;
params.debug_settings.debug_geography =
firebase::gma::ump::kConsentDebugGeographyNonEEA;
params.debug_settings.debug_device_ids = kTestDeviceIDs;
params.debug_settings.debug_device_ids.push_back(GetDebugDeviceId());

WaitForCompletion(consent_info_->RequestConsentInfoUpdate(params),
"RequestConsentInfoUpdate");

EXPECT_EQ(consent_info_->GetConsentStatus(),
firebase::gma::ump::kConsentStatusNotRequired);

firebase::Future<void> future =
consent_info_->LoadAndShowConsentFormIfRequired(
app_framework::GetWindowController());

EXPECT_TRUE(future ==
consent_info_->LoadAndShowConsentFormIfRequiredLastResult());

WaitForCompletion(future, "LoadAndShowConsentFormIfRequired");
}

TEST_F(FirebaseGmaUmpTest, TestUmpLoadAndShowIfRequired) {
TEST_F(FirebaseGmaUmpTest, TestUmpLoadAndShowIfRequiredDebugEEA) {
using firebase::gma::ump::ConsentDebugSettings;
using firebase::gma::ump::ConsentRequestParameters;
using firebase::gma::ump::ConsentStatus;
Expand All @@ -2728,6 +2780,8 @@ TEST_F(FirebaseGmaUmpTest, TestUmpLoadAndShowIfRequired) {
params.tag_for_under_age_of_consent = false;
params.debug_settings.debug_geography =
firebase::gma::ump::kConsentDebugGeographyEEA;
params.debug_settings.debug_device_ids = kTestDeviceIDs;
params.debug_settings.debug_device_ids.push_back(GetDebugDeviceId());

WaitForCompletion(consent_info_->RequestConsentInfoUpdate(params),
"RequestConsentInfoUpdate");
Expand All @@ -2736,7 +2790,8 @@ TEST_F(FirebaseGmaUmpTest, TestUmpLoadAndShowIfRequired) {
firebase::gma::ump::kConsentStatusRequired);

firebase::Future<void> future =
consent_info_->LoadAndShowConsentFormIfRequired(nullptr);
consent_info_->LoadAndShowConsentFormIfRequired(
app_framework::GetWindowController());

EXPECT_TRUE(future ==
consent_info_->LoadAndShowConsentFormIfRequiredLastResult());
Expand All @@ -2759,6 +2814,8 @@ TEST_F(FirebaseGmaUmpTest, TestUmpPrivacyOptions) {
params.tag_for_under_age_of_consent = false;
params.debug_settings.debug_geography =
firebase::gma::ump::kConsentDebugGeographyEEA;
params.debug_settings.debug_device_ids = kTestDeviceIDs;
params.debug_settings.debug_device_ids.push_back(GetDebugDeviceId());

WaitForCompletion(consent_info_->RequestConsentInfoUpdate(params),
"RequestConsentInfoUpdate");
Expand All @@ -2768,41 +2825,43 @@ TEST_F(FirebaseGmaUmpTest, TestUmpPrivacyOptions) {

EXPECT_FALSE(consent_info_->CanRequestAds());

WaitForCompletion(consent_info_->LoadAndShowConsentFormIfRequired(nullptr),
WaitForCompletion(consent_info_->LoadAndShowConsentFormIfRequired(
app_framework::GetWindowController()),
"LoadAndShowConsentFormIfRequired");

EXPECT_EQ(consent_info_->GetConsentStatus(),
firebase::gma::ump::kConsentStatusObtained);

EXPECT_TRUE(consent_info_->CanRequestAds());
EXPECT_TRUE(consent_info_->CanRequestAds()) << "After consent obtained";

LogInfo(
"******** On the Privacy Options screen that is about to appear, please "
"select DO NOT CONSENT.");

ProcessEvents(5000);

EXPECT_EQ(consent_info_->GetPrivacyOptionsRequirementStatus(),
firebase::gma::ump::kPrivacyOptionsRequirementStatusRequired);

firebase::Future<void> future =
consent_info_->ShowPrivacyOptionsForm(nullptr);
firebase::Future<void> future = consent_info_->ShowPrivacyOptionsForm(
app_framework::GetWindowController());

EXPECT_TRUE(future == consent_info_->ShowPrivacyOptionsFormLastResult());

WaitForCompletion(future, "ShowPrivacyOptionsForm");

EXPECT_EQ(consent_info_->GetConsentStatus(),
firebase::gma::ump::kConsentStatusRequired);

EXPECT_FALSE(consent_info_->CanRequestAds());
}

TEST_F(FirebaseGmaUmpTest, TestCanRequestAdsNonEEA) {
using firebase::gma::ump::ConsentDebugSettings;
using firebase::gma::ump::ConsentRequestParameters;
using firebase::gma::ump::ConsentStatus;

TEST_REQUIRES_USER_INTERACTION;

ConsentRequestParameters params;
params.tag_for_under_age_of_consent = false;
params.debug_settings.debug_geography =
firebase::gma::ump::kConsentDebugGeographyNonEEA;
params.debug_settings.debug_device_ids = kTestDeviceIDs;
params.debug_settings.debug_device_ids.push_back(GetDebugDeviceId());

WaitForCompletion(consent_info_->RequestConsentInfoUpdate(params),
"RequestConsentInfoUpdate");
Expand All @@ -2818,12 +2877,12 @@ TEST_F(FirebaseGmaUmpTest, TestCanRequestAdsEEA) {
using firebase::gma::ump::ConsentRequestParameters;
using firebase::gma::ump::ConsentStatus;

TEST_REQUIRES_USER_INTERACTION;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why do these no longer need user interaction?

Copy link
Contributor Author

@jonsimantov jonsimantov Aug 17, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Because I was able to add GetDebugDeviceId() to our test framework, so it can specify the debug settings even on FTL hardware.

The ones that show the consent form and/or the privacy form still do require user interaction, though.


ConsentRequestParameters params;
params.tag_for_under_age_of_consent = false;
params.debug_settings.debug_geography =
firebase::gma::ump::kConsentDebugGeographyEEA;
params.debug_settings.debug_device_ids = kTestDeviceIDs;
params.debug_settings.debug_device_ids.push_back(GetDebugDeviceId());

WaitForCompletion(consent_info_->RequestConsentInfoUpdate(params),
"RequestConsentInfoUpdate");
Expand All @@ -2834,7 +2893,30 @@ TEST_F(FirebaseGmaUmpTest, TestCanRequestAdsEEA) {
EXPECT_FALSE(consent_info_->CanRequestAds());
}

TEST_F(FirebaseGmaUmpTest, TestUmpCleanup) {
TEST_F(FirebaseGmaUmpTest, TestUmpCleanupWithDelay) {
using firebase::gma::ump::ConsentFormStatus;
using firebase::gma::ump::ConsentRequestParameters;
using firebase::gma::ump::ConsentStatus;

ConsentRequestParameters params;
params.tag_for_under_age_of_consent = false;
firebase::Future<void> future_request =
consent_info_->RequestConsentInfoUpdate(params);
firebase::Future<void> future_load = consent_info_->LoadConsentForm();
firebase::Future<void> future_show =
consent_info_->ShowConsentForm(app_framework::GetWindowController());

ProcessEvents(5000);

delete consent_info_;
consent_info_ = nullptr;

EXPECT_EQ(future_request.status(), firebase::kFutureStatusInvalid);
EXPECT_EQ(future_load.status(), firebase::kFutureStatusInvalid);
EXPECT_EQ(future_show.status(), firebase::kFutureStatusInvalid);
}

TEST_F(FirebaseGmaUmpTest, TestUmpCleanupRaceCondition) {
using firebase::gma::ump::ConsentFormStatus;
using firebase::gma::ump::ConsentRequestParameters;
using firebase::gma::ump::ConsentStatus;
Expand All @@ -2844,7 +2926,8 @@ TEST_F(FirebaseGmaUmpTest, TestUmpCleanup) {
firebase::Future<void> future_request =
consent_info_->RequestConsentInfoUpdate(params);
firebase::Future<void> future_load = consent_info_->LoadConsentForm();
firebase::Future<void> future_show = consent_info_->ShowConsentForm(nullptr);
firebase::Future<void> future_show =
consent_info_->ShowConsentForm(app_framework::GetWindowController());

delete consent_info_;
consent_info_ = nullptr;
Expand Down
6 changes: 3 additions & 3 deletions gma/src/common/ump/consent_info_internal.cc
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ const char* ConsentInfoInternal::GetConsentRequestErrorMessage(
return "Network error";
case kConsentRequestErrorInternal:
return "Internal error";
case kConsentRequestErrorCodeMisconfiguration:
case kConsentRequestErrorMisconfiguration:
return "A misconfiguration exists in the UI";
case kConsentRequestErrorUnknown:
return "Unknown error";
Expand All @@ -72,8 +72,8 @@ const char* ConsentInfoInternal::GetConsentFormErrorMessage(
return "Internal error";
case kConsentFormErrorUnknown:
return "Unknown error";
case kConsentFormErrorCodeAlreadyUsed:
return "Code already used";
case kConsentFormErrorAlreadyUsed:
return "The form was already used";
case kConsentFormErrorInvalidOperation:
return "Invalid operation";
case kConsentFormErrorOperationInProgress:
Expand Down
4 changes: 2 additions & 2 deletions gma/src/common/ump/consent_info_internal.h
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,8 @@ class ConsentInfoInternal {
// platform-specific subclass.
static ConsentInfoInternal* CreateInstance();

virtual ConsentStatus GetConsentStatus() const = 0;
virtual ConsentFormStatus GetConsentFormStatus() const = 0;
virtual ConsentStatus GetConsentStatus() = 0;
virtual ConsentFormStatus GetConsentFormStatus() = 0;

virtual Future<void> RequestConsentInfoUpdate(
const ConsentRequestParameters& params) = 0;
Expand Down
Loading