Files
brave-core/components/brave_mobile_subscription/renderer/android
Serg a537c15708 [Android] Implement Origin subscription linking after purchase (#34719)
Add support for linking Brave Origin subscriptions after purchase on
Android, following the same link-order flow used by Leo (AI Chat).

- Add OriginIAPSubscription Mojo interface and C++ implementation to
  read purchase token/order ID from prefs and persist link status
- Handle product=origin in SubscriptionRenderFrameObserver: inject
  braveOrigin.receipt and braveOrigin.orderId into localStorage on
  the initial landing page, and linkResult.setStatus() callback on
  the /order-link/ result page
- Register OriginIAPSubscription Mojo binding in
  BraveContentBrowserClient
- Update LinkSubscriptionUtils to use link-order intent for Origin
- Hide Purchase section in Origin preferences when already linked
- Move subscription_render_frame_observer.h include out of
  ENABLE_BRAVE_VPN guard so it is available for all Android
  subscription products
- Generalize Leo-specific constants (kIntentParamValueLeo,
  kResultLandingPagePathLeo) since they are now shared with Origin
- Add Origin test cases to browser tests

Resolves: https://github.com/brave/brave-browser/issues/53613
2026-03-24 12:59:55 -04:00
..