[Fusebox] Consolidate cached and live version of AddTabContext in native [chromium/src : main]

0 views
Skip to first unread message

Shakti Sahu (Gerrit)

unread,
Feb 27, 2026, 6:00:03 PMFeb 27
to Patrick Noland, Alex Turner, Shivani Sharma, Shivani Sharma, Hailey Wang, Calder Kitagawa, Sky Malice, Chromium LUCI CQ, AyeAye, chromium...@chromium.org, ender...@chromium.org
Attention needed from Calder Kitagawa, Hailey Wang, Patrick Noland, Shivani Sharma and Sky Malice

Shakti Sahu added 4 comments

File chrome/browser/android/omnibox/composebox_query_controller_bridge.cc
Line 222, Patchset 5: return Java_ComposeboxQueryControllerBridge_shouldAttemptCacheForTab(
Hailey Wang . resolved

I don't know if there's really a need to do a JNI call here, all information should be available native I thought.

Calder Kitagawa

+1

Shakti Sahu

Moved the logic to native and removed JNI call.

Line 266, Patchset 2: lens::TabContextualizationController* controller =
tab ? lens::TabContextualizationController::From(tab) : nullptr;
Calder Kitagawa . resolved

I was envisioning rather than using this we'd ask the PageContentExtractionService to fetch via the same mechanism the cache uses. That way all the codepaths are the same?

Hailey Wang

+1, I think what Calder mentioned make more sense, it would allow live extraction to also be cached.

Shakti Sahu

Ack. But that probably needs more work to integrate the caching / live data well in the PCES? TabContextualizationController does a few things outside of PCES. I dont knwo the implications yet. Meanwhile, I wanted to unblock fusebox / composebox refactor work for mobile. Thoughts?

Calder Kitagawa

Doing this short term is OK, but I do think it is worth filing a bug and making sure we follow-up on having a single service for extracting contexts before too much gets built upon split paths.

Hailey Wang

Maybe try reaching out to @shiva...@chromium.org for the modifications of page content extraction service see if they have extra cycles for this change...

Shivani Sharma

Ack, can you please create an issue for the follow up and assign to @ale...@chromium.org. Thanks!

Shakti Sahu

Filed b/488055569

Line 276, Patchset 2: controller->GetPageContext(
Calder Kitagawa . unresolved

Does this call save to the cache somewhere? I thought the point of unifying live fetching was so the live fetch also ended up in the cache?

Shakti Sahu

I think this did not. We need follow up work to integrate this with PageContentExtractionService. Currently PCES only extracts the content and caches them when a tab goes to background. This is good, but we need to integrate any ondemand stuff to be cached as well.

Line 433, Patchset 5: // TODO(shaktisahu): Add retry logic. Look for the fie_token and retry. Need
// to understand when we retry (This is replacement for retryUpload from
// Java). Might be able to get the file info from session handle or might need
// to store some additional info in this class.
Shakti Sahu . resolved

This might complicate things. Need to resolve beofre I land this.

Shakti Sahu

Done

Open in Gerrit

Related details

Attention is currently required from:
  • Calder Kitagawa
  • Hailey Wang
  • Patrick Noland
  • Shivani Sharma
  • Sky Malice
Submit Requirements:
  • requirement satisfiedCode-Coverage
  • requirement is not satisfiedCode-Owners
  • requirement is not satisfiedCode-Review
  • requirement is not satisfiedNo-Unresolved-Comments
  • requirement is not satisfiedReview-Enforcement
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
Gerrit-MessageType: comment
Gerrit-Project: chromium/src
Gerrit-Branch: main
Gerrit-Change-Id: I13ea85998690005083edb66b33b28d02658eec7f
Gerrit-Change-Number: 7599499
Gerrit-PatchSet: 7
Gerrit-Owner: Shakti Sahu <shakt...@chromium.org>
Gerrit-Reviewer: Calder Kitagawa <ckit...@chromium.org>
Gerrit-Reviewer: Patrick Noland <pno...@chromium.org>
Gerrit-Reviewer: Shakti Sahu <shakt...@chromium.org>
Gerrit-Reviewer: Sky Malice <sk...@chromium.org>
Gerrit-CC: Alex Turner <ale...@chromium.org>
Gerrit-CC: Hailey Wang <haile...@google.com>
Gerrit-CC: Shivani Sharma <shiva...@chromium.org>
Gerrit-CC: Shivani Sharma <shiva...@google.com>
Gerrit-Attention: Hailey Wang <haile...@google.com>
Gerrit-Attention: Shivani Sharma <shiva...@google.com>
Gerrit-Attention: Patrick Noland <pno...@chromium.org>
Gerrit-Attention: Calder Kitagawa <ckit...@chromium.org>
Gerrit-Attention: Sky Malice <sk...@chromium.org>
Gerrit-Comment-Date: Fri, 27 Feb 2026 22:59:57 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: Shakti Sahu <shakt...@chromium.org>
Comment-In-Reply-To: Hailey Wang <haile...@google.com>
Comment-In-Reply-To: Shivani Sharma <shiva...@google.com>
Comment-In-Reply-To: Calder Kitagawa <ckit...@chromium.org>
satisfied_requirement
unsatisfied_requirement
open
diffy

Hailey Wang (Gerrit)

unread,
Feb 27, 2026, 6:26:52 PMFeb 27
to Shakti Sahu, Patrick Noland, Alex Turner, Shivani Sharma, Shivani Sharma, Calder Kitagawa, Sky Malice, Chromium LUCI CQ, AyeAye, chromium...@chromium.org, ender...@chromium.org
Attention needed from Calder Kitagawa, Patrick Noland, Shakti Sahu, Shivani Sharma and Sky Malice

Hailey Wang added 1 comment

Patchset-level comments
File-level comment, Patchset 7 (Latest):
Hailey Wang . unresolved

Discussed offline: I think it's still better if we can have Alex merge the live fetching logic into the page content extraction service if possible in the next week.

If this is blocking desktop tab picker work, ok to land current change as it just moves Java retry logic into native to unblock desktop using cache. Maybe double check with @pno...@chromium.org what he thinks~

Open in Gerrit

Related details

Attention is currently required from:
  • Calder Kitagawa
  • Patrick Noland
  • Shakti Sahu
  • Shivani Sharma
  • Sky Malice
Gerrit-Attention: Shakti Sahu <shakt...@chromium.org>
Gerrit-Attention: Shivani Sharma <shiva...@google.com>
Gerrit-Attention: Patrick Noland <pno...@chromium.org>
Gerrit-Attention: Calder Kitagawa <ckit...@chromium.org>
Gerrit-Attention: Sky Malice <sk...@chromium.org>
Gerrit-Comment-Date: Fri, 27 Feb 2026 23:26:36 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
satisfied_requirement
unsatisfied_requirement
open
diffy

Calder Kitagawa (Gerrit)

unread,
Mar 2, 2026, 8:09:09 AMMar 2
to Shakti Sahu, Patrick Noland, Alex Turner, Shivani Sharma, Shivani Sharma, Hailey Wang, Sky Malice, Chromium LUCI CQ, AyeAye, chromium...@chromium.org, ender...@chromium.org
Attention needed from Patrick Noland, Shakti Sahu, Shivani Sharma and Sky Malice

Calder Kitagawa added 2 comments

Patchset-level comments
Calder Kitagawa . resolved

At a high level this LGTM, but not going to CR+1 it until Sky and/or Patrick also take a look.

File chrome/browser/android/omnibox/composebox_query_controller_bridge.cc
Line 276, Patchset 2: controller->GetPageContext(
Calder Kitagawa . resolved

Does this call save to the cache somewhere? I thought the point of unifying live fetching was so the live fetch also ended up in the cache?

Shakti Sahu

I think this did not. We need follow up work to integrate this with PageContentExtractionService. Currently PCES only extracts the content and caches them when a tab goes to background. This is good, but we need to integrate any ondemand stuff to be cached as well.

Calder Kitagawa

SGTM we should include this in the scope of b/488055569 (I added it).

Open in Gerrit

Related details

Attention is currently required from:
Gerrit-Attention: Sky Malice <sk...@chromium.org>
Gerrit-Comment-Date: Mon, 02 Mar 2026 13:09:02 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: Shakti Sahu <shakt...@chromium.org>
Comment-In-Reply-To: Calder Kitagawa <ckit...@chromium.org>
satisfied_requirement
unsatisfied_requirement
open
diffy

Patrick Noland (Gerrit)

unread,
Mar 2, 2026, 12:17:37 PMMar 2
to Shakti Sahu, Alex Turner, Shivani Sharma, Shivani Sharma, Hailey Wang, Calder Kitagawa, Sky Malice, Chromium LUCI CQ, AyeAye, chromium...@chromium.org, ender...@chromium.org
Attention needed from Shakti Sahu, Shivani Sharma and Sky Malice

Patrick Noland added 3 comments

File chrome/browser/android/omnibox/composebox_query_controller_bridge.h
Line 79, Patchset 7 (Latest): void TryCacheThenLive(JNIEnv* env,
Patrick Noland . unresolved
```suggestion
void TryAddTabContextFromCacheThenLive
```

And please add a comment explaining the callback execution flow

File chrome/browser/android/omnibox/composebox_query_controller_bridge.cc
Line 270, Patchset 7 (Latest): tabs::TabInterface* tab = tab_handle.Get();
Patrick Noland . unresolved

Is this guaranteed to be non-null?

File chrome/browser/ui/android/omnibox/java/src/org/chromium/chrome/browser/omnibox/fusebox/FuseboxAttachmentModelList.java
Line 391, Patchset 7 (Latest): // We don't retry here, as the retry has been already handled in the native code at
// this point.
Patrick Noland . unresolved

I would just remove this entirely; the existence of retry logic is what justified a comment; you don't need to explain the lack of it

Open in Gerrit

Related details

Attention is currently required from:
Gerrit-Attention: Sky Malice <sk...@chromium.org>
Gerrit-Comment-Date: Mon, 02 Mar 2026 17:17:29 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
satisfied_requirement
unsatisfied_requirement
open
diffy

Shakti Sahu (Gerrit)

unread,
2:38 AM (5 hours ago) 2:38 AM
to Code Review Nudger, Patrick Noland, Alex Turner, Shivani Sharma, Hailey Wang, Calder Kitagawa, Sky Malice, Chromium LUCI CQ, android-bu...@system.gserviceaccount.com, chromium...@chromium.org, ender...@chromium.org

Shakti Sahu abandoned this change.

View Change

Abandoned

Shakti Sahu abandoned this change

Related details

Attention set is empty
Submit Requirements:
  • requirement satisfiedCode-Coverage
  • requirement is not satisfiedCode-Review
  • requirement is not satisfiedNo-Unresolved-Comments
  • requirement is not satisfiedReview-Enforcement
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
Gerrit-MessageType: abandon
Gerrit-Project: chromium/src
Gerrit-Branch: main
Gerrit-Change-Id: I13ea85998690005083edb66b33b28d02658eec7f
Gerrit-Change-Number: 7599499
Gerrit-PatchSet: 7
Gerrit-Owner: Shakti Sahu <shakt...@chromium.org>
Gerrit-Reviewer: Calder Kitagawa <ckit...@chromium.org>
Gerrit-Reviewer: Patrick Noland <pno...@chromium.org>
Gerrit-Reviewer: Shakti Sahu <shakt...@chromium.org>
Gerrit-Reviewer: Sky Malice <sk...@chromium.org>
Gerrit-CC: Alex Turner <ale...@chromium.org>
Gerrit-CC: Code Review Nudger <android-build...@prod.google.com>
Gerrit-CC: Hailey Wang <haile...@google.com>
Gerrit-CC: Shivani Sharma <shiva...@chromium.org>
Gerrit-CC: Shivani Sharma <shiva...@google.com>
satisfied_requirement
unsatisfied_requirement
open
diffy
Reply all
Reply to author
Forward
0 new messages