Skip to content

Commit 890e829

Browse files
authored
Add User Messaging Platform iOS support (#1412)
* Add iOS files, copies of stubs for now. * Format code. * Update cocoapod versions and add UMP pod. * Add iOS basics, also rename two enums. * Fixes. * Format code. * Fix compiler errors. * Add test flag for skipping on hardware. * Fix iOS implementation and tests to match actual results. Add a test skip macro for skipping on physical hardware. * Format code and add general GMA tests back in. * Enable App Transparency for iOS app. * Add debug device ID to test framework on iOS. * Change tests that use debug IDs to work differently. * Add debug ID to certain tests. * Format code. * Format code. * Add a mutex to prevent race condition. * Update test to check race condition. * Add include for lint * Update test name. * Remove user interaction flag from debug test. * Format code. * Remove UMP-only test mode. * Remove unnecessary test stuff. Return existing instance rather than creating new instance of internal class. * Fix assert. * Fix stub to match iOS flow.
1 parent 2c253aa commit 890e829

File tree

17 files changed

+530
-40
lines changed

17 files changed

+530
-40
lines changed

gma/CMakeLists.txt

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ set(android_SRCS
5454

5555
# Source files used by the iOS implementation.
5656
set(ios_SRCS
57-
src/stub/ump/consent_info_internal_stub.cc
57+
src/ios/ump/consent_info_internal_ios.mm
5858
src/ios/FADAdSize.mm
5959
src/ios/FADAdView.mm
6060
src/ios/FADInterstitialDelegate.mm
@@ -133,11 +133,13 @@ elseif(IOS)
133133
firebase_gma
134134
POD_NAMES
135135
Google-Mobile-Ads-SDK
136+
GoogleUserMessagingPlatform
136137
)
137138

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

142144
if (FIREBASE_XCODE_TARGET_FORMAT STREQUAL "frameworks")
143145
set_target_properties(firebase_gma PROPERTIES

gma/integration_test/Info.plist

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,8 @@
2424
<true/>
2525
<key>UILaunchStoryboardName</key>
2626
<string>LaunchScreen</string>
27+
<key>NSUserTrackingUsageDescription</key>
28+
<string>This identifier will be used to deliver personalized ads to you.</string>
2729
<key>CFBundleURLTypes</key>
2830
<array>
2931
<dict>

gma/integration_test/Podfile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ use_frameworks! :linkage => :static
66
target 'integration_test' do
77
pod 'Firebase/CoreOnly', '10.13.0'
88
pod 'Google-Mobile-Ads-SDK', '10.9.0'
9+
pod 'GoogleUserMessagingPlatform', '2.1.0'
910
end
1011

1112
post_install do |installer|

gma/integration_test/integration_test.xcodeproj/project.pbxproj

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717
D640F3172819C85800AC956E /* empty.swift in Sources */ = {isa = PBXBuildFile; fileRef = D640F3162819C85800AC956E /* empty.swift */; };
1818
D66B16871CE46E8900E5638A /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = D66B16861CE46E8900E5638A /* LaunchScreen.storyboard */; };
1919
D67D355822BABD2200292C1D /* gtest-all.cc in Sources */ = {isa = PBXBuildFile; fileRef = D67D355622BABD2100292C1D /* gtest-all.cc */; };
20+
D686A3292A8B16F20034845A /* AppTrackingTransparency.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = D686A3282A8B16F20034845A /* AppTrackingTransparency.framework */; };
2021
D6C179E922CB322900C2651A /* ios_app_framework.mm in Sources */ = {isa = PBXBuildFile; fileRef = D6C179E722CB322900C2651A /* ios_app_framework.mm */; };
2122
D6C179EA22CB322900C2651A /* ios_firebase_test_framework.mm in Sources */ = {isa = PBXBuildFile; fileRef = D6C179E822CB322900C2651A /* ios_firebase_test_framework.mm */; };
2223
D6C179EE22CB323300C2651A /* firebase_test_framework.cc in Sources */ = {isa = PBXBuildFile; fileRef = D6C179EC22CB323300C2651A /* firebase_test_framework.cc */; };
@@ -39,6 +40,7 @@
3940
D66B16861CE46E8900E5638A /* LaunchScreen.storyboard */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.storyboard; path = LaunchScreen.storyboard; sourceTree = "<group>"; };
4041
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>"; };
4142
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>"; };
43+
D686A3282A8B16F20034845A /* AppTrackingTransparency.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AppTrackingTransparency.framework; path = System/Library/Frameworks/AppTrackingTransparency.framework; sourceTree = SDKROOT; };
4244
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>"; };
4345
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>"; };
4446
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>"; };
@@ -53,6 +55,7 @@
5355
buildActionMask = 2147483647;
5456
files = (
5557
529226D81C85F68000C89379 /* CoreGraphics.framework in Frameworks */,
58+
D686A3292A8B16F20034845A /* AppTrackingTransparency.framework in Frameworks */,
5659
529226DA1C85F68000C89379 /* UIKit.framework in Frameworks */,
5760
529226D61C85F68000C89379 /* Foundation.framework in Frameworks */,
5861
);
@@ -85,6 +88,7 @@
8588
529226D41C85F68000C89379 /* Frameworks */ = {
8689
isa = PBXGroup;
8790
children = (
91+
D686A3282A8B16F20034845A /* AppTrackingTransparency.framework */,
8892
529226D51C85F68000C89379 /* Foundation.framework */,
8993
529226D71C85F68000C89379 /* CoreGraphics.framework */,
9094
529226D91C85F68000C89379 /* UIKit.framework */,

gma/integration_test/src/integration_test.cc

Lines changed: 110 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -98,6 +98,8 @@ const char* kErrorDomain = "com.google.admob";
9898
#endif
9999

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

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

138140
using app_framework::LogDebug;
141+
using app_framework::LogInfo;
139142
using app_framework::LogWarning;
140143
using app_framework::ProcessEvents;
141144

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

24992502
void FirebaseGmaUmpTest::TerminateUmp() {
25002503
if (consent_info_) {
2504+
consent_info_->Reset();
25012505
delete consent_info_;
25022506
consent_info_ = nullptr;
25032507
}
@@ -2591,6 +2595,8 @@ TEST_F(FirebaseGmaUmpTest, TestUmpRequestConsentInfoUpdateDebugEEA) {
25912595
params.tag_for_under_age_of_consent = false;
25922596
params.debug_settings.debug_geography =
25932597
firebase::gma::ump::kConsentDebugGeographyEEA;
2598+
params.debug_settings.debug_device_ids = kTestDeviceIDs;
2599+
params.debug_settings.debug_device_ids.push_back(GetDebugDeviceId());
25942600

25952601
firebase::Future<void> future =
25962602
consent_info_->RequestConsentInfoUpdate(params);
@@ -2610,6 +2616,8 @@ TEST_F(FirebaseGmaUmpTest, TestUmpRequestConsentInfoUpdateDebugNonEEA) {
26102616
params.tag_for_under_age_of_consent = false;
26112617
params.debug_settings.debug_geography =
26122618
firebase::gma::ump::kConsentDebugGeographyNonEEA;
2619+
params.debug_settings.debug_device_ids = kTestDeviceIDs;
2620+
params.debug_settings.debug_device_ids.push_back(GetDebugDeviceId());
26132621

26142622
firebase::Future<void> future =
26152623
consent_info_->RequestConsentInfoUpdate(params);
@@ -2630,6 +2638,8 @@ TEST_F(FirebaseGmaUmpTest, TestUmpLoadForm) {
26302638
params.tag_for_under_age_of_consent = false;
26312639
params.debug_settings.debug_geography =
26322640
firebase::gma::ump::kConsentDebugGeographyEEA;
2641+
params.debug_settings.debug_device_ids = kTestDeviceIDs;
2642+
params.debug_settings.debug_device_ids.push_back(GetDebugDeviceId());
26332643

26342644
WaitForCompletion(consent_info_->RequestConsentInfoUpdate(params),
26352645
"RequestConsentInfoUpdate");
@@ -2663,6 +2673,8 @@ TEST_F(FirebaseGmaUmpTest, TestUmpShowForm) {
26632673
params.tag_for_under_age_of_consent = false;
26642674
params.debug_settings.debug_geography =
26652675
firebase::gma::ump::kConsentDebugGeographyEEA;
2676+
params.debug_settings.debug_device_ids = kTestDeviceIDs;
2677+
params.debug_settings.debug_device_ids.push_back(GetDebugDeviceId());
26662678

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

2681-
firebase::Future<void> future = consent_info_->ShowConsentForm(nullptr);
2693+
firebase::Future<void> future =
2694+
consent_info_->ShowConsentForm(app_framework::GetWindowController());
26822695

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

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

2691-
TEST_F(FirebaseGmaUmpTest, TestUmpLoadFormUnavailableDueUnderAgeOfConsent) {
2692-
TEST_REQUIRES_USER_INTERACTION;
2693-
2704+
TEST_F(FirebaseGmaUmpTest, TestUmpLoadFormUnavailableDueToUnderAgeOfConsent) {
26942705
using firebase::gma::ump::ConsentDebugSettings;
26952706
using firebase::gma::ump::ConsentFormStatus;
26962707
using firebase::gma::ump::ConsentRequestParameters;
@@ -2700,24 +2711,65 @@ TEST_F(FirebaseGmaUmpTest, TestUmpLoadFormUnavailableDueUnderAgeOfConsent) {
27002711
params.tag_for_under_age_of_consent = true;
27012712
params.debug_settings.debug_geography =
27022713
firebase::gma::ump::kConsentDebugGeographyEEA;
2714+
params.debug_settings.debug_device_ids = kTestDeviceIDs;
2715+
params.debug_settings.debug_device_ids.push_back(GetDebugDeviceId());
27032716

27042717
WaitForCompletion(consent_info_->RequestConsentInfoUpdate(params),
27052718
"RequestConsentInfoUpdate");
27062719

2707-
EXPECT_EQ(consent_info_->GetConsentStatus(),
2708-
firebase::gma::ump::kConsentStatusRequired);
2720+
WaitForCompletion(consent_info_->LoadConsentForm(), "LoadConsentForm",
2721+
firebase::gma::ump::kConsentFormErrorUnavailable);
2722+
}
27092723

2710-
EXPECT_EQ(consent_info_->GetConsentFormStatus(),
2711-
firebase::gma::ump::kConsentFormStatusUnavailable);
2724+
TEST_F(FirebaseGmaUmpTest, TestUmpLoadFormUnavailableDebugNonEEA) {
2725+
using firebase::gma::ump::ConsentDebugSettings;
2726+
using firebase::gma::ump::ConsentFormStatus;
2727+
using firebase::gma::ump::ConsentRequestParameters;
2728+
using firebase::gma::ump::ConsentStatus;
2729+
2730+
ConsentRequestParameters params;
2731+
params.tag_for_under_age_of_consent = false;
2732+
params.debug_settings.debug_geography =
2733+
firebase::gma::ump::kConsentDebugGeographyNonEEA;
2734+
params.debug_settings.debug_device_ids = kTestDeviceIDs;
2735+
params.debug_settings.debug_device_ids.push_back(GetDebugDeviceId());
2736+
2737+
WaitForCompletion(consent_info_->RequestConsentInfoUpdate(params),
2738+
"RequestConsentInfoUpdate");
27122739

27132740
WaitForCompletion(consent_info_->LoadConsentForm(), "LoadConsentForm",
27142741
firebase::gma::ump::kConsentFormErrorUnavailable);
2742+
}
27152743

2716-
EXPECT_EQ(consent_info_->GetConsentFormStatus(),
2717-
firebase::gma::ump::kConsentFormStatusUnavailable);
2744+
TEST_F(FirebaseGmaUmpTest, TestUmpLoadAndShowIfRequiredDebugNonEEA) {
2745+
using firebase::gma::ump::ConsentDebugSettings;
2746+
using firebase::gma::ump::ConsentRequestParameters;
2747+
using firebase::gma::ump::ConsentStatus;
2748+
2749+
ConsentRequestParameters params;
2750+
params.tag_for_under_age_of_consent = false;
2751+
params.debug_settings.debug_geography =
2752+
firebase::gma::ump::kConsentDebugGeographyNonEEA;
2753+
params.debug_settings.debug_device_ids = kTestDeviceIDs;
2754+
params.debug_settings.debug_device_ids.push_back(GetDebugDeviceId());
2755+
2756+
WaitForCompletion(consent_info_->RequestConsentInfoUpdate(params),
2757+
"RequestConsentInfoUpdate");
2758+
2759+
EXPECT_EQ(consent_info_->GetConsentStatus(),
2760+
firebase::gma::ump::kConsentStatusNotRequired);
2761+
2762+
firebase::Future<void> future =
2763+
consent_info_->LoadAndShowConsentFormIfRequired(
2764+
app_framework::GetWindowController());
2765+
2766+
EXPECT_TRUE(future ==
2767+
consent_info_->LoadAndShowConsentFormIfRequiredLastResult());
2768+
2769+
WaitForCompletion(future, "LoadAndShowConsentFormIfRequired");
27182770
}
27192771

2720-
TEST_F(FirebaseGmaUmpTest, TestUmpLoadAndShowIfRequired) {
2772+
TEST_F(FirebaseGmaUmpTest, TestUmpLoadAndShowIfRequiredDebugEEA) {
27212773
using firebase::gma::ump::ConsentDebugSettings;
27222774
using firebase::gma::ump::ConsentRequestParameters;
27232775
using firebase::gma::ump::ConsentStatus;
@@ -2728,6 +2780,8 @@ TEST_F(FirebaseGmaUmpTest, TestUmpLoadAndShowIfRequired) {
27282780
params.tag_for_under_age_of_consent = false;
27292781
params.debug_settings.debug_geography =
27302782
firebase::gma::ump::kConsentDebugGeographyEEA;
2783+
params.debug_settings.debug_device_ids = kTestDeviceIDs;
2784+
params.debug_settings.debug_device_ids.push_back(GetDebugDeviceId());
27312785

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

27382792
firebase::Future<void> future =
2739-
consent_info_->LoadAndShowConsentFormIfRequired(nullptr);
2793+
consent_info_->LoadAndShowConsentFormIfRequired(
2794+
app_framework::GetWindowController());
27402795

27412796
EXPECT_TRUE(future ==
27422797
consent_info_->LoadAndShowConsentFormIfRequiredLastResult());
@@ -2759,6 +2814,8 @@ TEST_F(FirebaseGmaUmpTest, TestUmpPrivacyOptions) {
27592814
params.tag_for_under_age_of_consent = false;
27602815
params.debug_settings.debug_geography =
27612816
firebase::gma::ump::kConsentDebugGeographyEEA;
2817+
params.debug_settings.debug_device_ids = kTestDeviceIDs;
2818+
params.debug_settings.debug_device_ids.push_back(GetDebugDeviceId());
27622819

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

27692826
EXPECT_FALSE(consent_info_->CanRequestAds());
27702827

2771-
WaitForCompletion(consent_info_->LoadAndShowConsentFormIfRequired(nullptr),
2828+
WaitForCompletion(consent_info_->LoadAndShowConsentFormIfRequired(
2829+
app_framework::GetWindowController()),
27722830
"LoadAndShowConsentFormIfRequired");
27732831

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

2777-
EXPECT_TRUE(consent_info_->CanRequestAds());
2835+
EXPECT_TRUE(consent_info_->CanRequestAds()) << "After consent obtained";
2836+
2837+
LogInfo(
2838+
"******** On the Privacy Options screen that is about to appear, please "
2839+
"select DO NOT CONSENT.");
2840+
2841+
ProcessEvents(5000);
27782842

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

2782-
firebase::Future<void> future =
2783-
consent_info_->ShowPrivacyOptionsForm(nullptr);
2846+
firebase::Future<void> future = consent_info_->ShowPrivacyOptionsForm(
2847+
app_framework::GetWindowController());
27842848

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

27872851
WaitForCompletion(future, "ShowPrivacyOptionsForm");
2788-
2789-
EXPECT_EQ(consent_info_->GetConsentStatus(),
2790-
firebase::gma::ump::kConsentStatusRequired);
2791-
2792-
EXPECT_FALSE(consent_info_->CanRequestAds());
27932852
}
27942853

27952854
TEST_F(FirebaseGmaUmpTest, TestCanRequestAdsNonEEA) {
27962855
using firebase::gma::ump::ConsentDebugSettings;
27972856
using firebase::gma::ump::ConsentRequestParameters;
27982857
using firebase::gma::ump::ConsentStatus;
27992858

2800-
TEST_REQUIRES_USER_INTERACTION;
2801-
28022859
ConsentRequestParameters params;
28032860
params.tag_for_under_age_of_consent = false;
28042861
params.debug_settings.debug_geography =
28052862
firebase::gma::ump::kConsentDebugGeographyNonEEA;
2863+
params.debug_settings.debug_device_ids = kTestDeviceIDs;
2864+
params.debug_settings.debug_device_ids.push_back(GetDebugDeviceId());
28062865

28072866
WaitForCompletion(consent_info_->RequestConsentInfoUpdate(params),
28082867
"RequestConsentInfoUpdate");
@@ -2818,12 +2877,12 @@ TEST_F(FirebaseGmaUmpTest, TestCanRequestAdsEEA) {
28182877
using firebase::gma::ump::ConsentRequestParameters;
28192878
using firebase::gma::ump::ConsentStatus;
28202879

2821-
TEST_REQUIRES_USER_INTERACTION;
2822-
28232880
ConsentRequestParameters params;
28242881
params.tag_for_under_age_of_consent = false;
28252882
params.debug_settings.debug_geography =
28262883
firebase::gma::ump::kConsentDebugGeographyEEA;
2884+
params.debug_settings.debug_device_ids = kTestDeviceIDs;
2885+
params.debug_settings.debug_device_ids.push_back(GetDebugDeviceId());
28272886

28282887
WaitForCompletion(consent_info_->RequestConsentInfoUpdate(params),
28292888
"RequestConsentInfoUpdate");
@@ -2834,7 +2893,30 @@ TEST_F(FirebaseGmaUmpTest, TestCanRequestAdsEEA) {
28342893
EXPECT_FALSE(consent_info_->CanRequestAds());
28352894
}
28362895

2837-
TEST_F(FirebaseGmaUmpTest, TestUmpCleanup) {
2896+
TEST_F(FirebaseGmaUmpTest, TestUmpCleanupWithDelay) {
2897+
using firebase::gma::ump::ConsentFormStatus;
2898+
using firebase::gma::ump::ConsentRequestParameters;
2899+
using firebase::gma::ump::ConsentStatus;
2900+
2901+
ConsentRequestParameters params;
2902+
params.tag_for_under_age_of_consent = false;
2903+
firebase::Future<void> future_request =
2904+
consent_info_->RequestConsentInfoUpdate(params);
2905+
firebase::Future<void> future_load = consent_info_->LoadConsentForm();
2906+
firebase::Future<void> future_show =
2907+
consent_info_->ShowConsentForm(app_framework::GetWindowController());
2908+
2909+
ProcessEvents(5000);
2910+
2911+
delete consent_info_;
2912+
consent_info_ = nullptr;
2913+
2914+
EXPECT_EQ(future_request.status(), firebase::kFutureStatusInvalid);
2915+
EXPECT_EQ(future_load.status(), firebase::kFutureStatusInvalid);
2916+
EXPECT_EQ(future_show.status(), firebase::kFutureStatusInvalid);
2917+
}
2918+
2919+
TEST_F(FirebaseGmaUmpTest, TestUmpCleanupRaceCondition) {
28382920
using firebase::gma::ump::ConsentFormStatus;
28392921
using firebase::gma::ump::ConsentRequestParameters;
28402922
using firebase::gma::ump::ConsentStatus;
@@ -2844,7 +2926,8 @@ TEST_F(FirebaseGmaUmpTest, TestUmpCleanup) {
28442926
firebase::Future<void> future_request =
28452927
consent_info_->RequestConsentInfoUpdate(params);
28462928
firebase::Future<void> future_load = consent_info_->LoadConsentForm();
2847-
firebase::Future<void> future_show = consent_info_->ShowConsentForm(nullptr);
2929+
firebase::Future<void> future_show =
2930+
consent_info_->ShowConsentForm(app_framework::GetWindowController());
28482931

28492932
delete consent_info_;
28502933
consent_info_ = nullptr;

gma/src/common/ump/consent_info_internal.cc

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ const char* ConsentInfoInternal::GetConsentRequestErrorMessage(
4545
return "Network error";
4646
case kConsentRequestErrorInternal:
4747
return "Internal error";
48-
case kConsentRequestErrorCodeMisconfiguration:
48+
case kConsentRequestErrorMisconfiguration:
4949
return "A misconfiguration exists in the UI";
5050
case kConsentRequestErrorUnknown:
5151
return "Unknown error";
@@ -72,8 +72,8 @@ const char* ConsentInfoInternal::GetConsentFormErrorMessage(
7272
return "Internal error";
7373
case kConsentFormErrorUnknown:
7474
return "Unknown error";
75-
case kConsentFormErrorCodeAlreadyUsed:
76-
return "Code already used";
75+
case kConsentFormErrorAlreadyUsed:
76+
return "The form was already used";
7777
case kConsentFormErrorInvalidOperation:
7878
return "Invalid operation";
7979
case kConsentFormErrorOperationInProgress:

gma/src/common/ump/consent_info_internal.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,8 +46,8 @@ class ConsentInfoInternal {
4646
// platform-specific subclass.
4747
static ConsentInfoInternal* CreateInstance();
4848

49-
virtual ConsentStatus GetConsentStatus() const = 0;
50-
virtual ConsentFormStatus GetConsentFormStatus() const = 0;
49+
virtual ConsentStatus GetConsentStatus() = 0;
50+
virtual ConsentFormStatus GetConsentFormStatus() = 0;
5151

5252
virtual Future<void> RequestConsentInfoUpdate(
5353
const ConsentRequestParameters& params) = 0;

0 commit comments

Comments
 (0)