File tree Expand file tree Collapse file tree 1 file changed +8
-0
lines changed Expand file tree Collapse file tree 1 file changed +8
-0
lines changed Original file line number Diff line number Diff line change 25
25
#include " base/threading/thread_restrictions.h"
26
26
#include " brave/components/brave_user_agent/browser/brave_user_agent_exceptions.h"
27
27
#include " brave/components/p3a/buildflags.h"
28
+ #include " brave/components/p3a/component_installer.h"
28
29
#include " brave/components/p3a/histograms_braveizer.h"
29
30
#include " brave/components/p3a/p3a_config.h"
30
31
#include " brave/components/p3a/p3a_service.h"
@@ -309,6 +310,13 @@ - (void)initializeP3AServiceForChannel:(NSString*)channel
309
310
_p3a_service->InitCallbacks ();
310
311
_p3a_service->Init (GetApplicationContext ()->GetSharedURLLoaderFactory ());
311
312
_histogram_braveizer = p3a::HistogramsBraveizer::Create ();
313
+ // Typically we'd register this component in RegisterComponentsForUpdate, but
314
+ // because iOS needs to pass in the install date from the Swift side we don't
315
+ // initialize the P3A service until after WebMain is started. If this changes
316
+ // in the future, move this call there.
317
+ p3a::RegisterP3AComponent (
318
+ GetApplicationContext ()->GetComponentUpdateService (),
319
+ _p3a_service->remote_config_manager ()->GetWeakPtr ());
312
320
#endif // BUILDFLAG(BRAVE_P3A_ENABLED)
313
321
}
314
322
You can’t perform that action at this time.
0 commit comments