New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 813554 link

Starred by 2 users

Issue metadata

Status: Available
Owner:
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Android
Pri: 2
Type: Bug



Sign in to add a comment

Use Profile#getLastUsedProfile() instead of ProfileManager::GetActiveUserProfile() on Android

Project Member Reported by msramek@chromium.org, Feb 19 2018

Issue description

In its Java->C++ calls, PrefServiceBridge (and other similar bridges) typically obtain the Profile on the C++ side by calling ProfileManager::GetActiveUserProfile().

Instead, they should retrieve the profile on the Java side from Profile#getLastUsedProfile() and pass it to C++, as that method also checks that native initialization has completed.

See issue 704025 for more background.
 
Project Member

Comment 1 by bugdroid1@chromium.org, Feb 19 2018

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/7e4d9a27935e39c024c4024f922c8cd3e45ff567

commit 7e4d9a27935e39c024c4024f922c8cd3e45ff567
Author: Martin Sramek <msramek@chromium.org>
Date: Mon Feb 19 16:41:40 2018

Use Profile#getLastUsedProfile() in BrowsingDataBridge

Bug: 813554
Change-Id: I0f9944b5919b9d51e46868aaafa16dd18952dee6
Reviewed-on: https://chromium-review.googlesource.com/924034
Reviewed-by: Bernhard Bauer <bauerb@chromium.org>
Reviewed-by: Christian Dullweber <dullweber@chromium.org>
Commit-Queue: Martin Šrámek <msramek@chromium.org>
Cr-Commit-Position: refs/heads/master@{#537663}
[modify] https://crrev.com/7e4d9a27935e39c024c4024f922c8cd3e45ff567/chrome/android/java/src/org/chromium/chrome/browser/preferences/privacy/BrowsingDataBridge.java
[modify] https://crrev.com/7e4d9a27935e39c024c4024f922c8cd3e45ff567/chrome/browser/android/browsing_data/browsing_data_bridge.cc

msramek@ can this bug be marked as fixed now?
No, the change in #1 was just for BrowsingDataBridge. There are plenty of others; especially PrefServiceBridge is likely going to be a large rewrite.
Components: Services>SignIn UI>Browser>Profiles
Owner: bsazonov@chromium.org
I'll take it so it doesn't get forgotten. I have to resolve most of profile-related crashes anyway. I won't have time to work on it till M-67 branch, sorry.
Status: Assigned (was: Available)
Project Member

Comment 6 by sheriffbot@chromium.org, Sep 3

Status: Available (was: Assigned)
--Chrome Identity automated triaging--

This bug is Assigned and has gone one month without any activity, so it is being moved to Available to indicate that it is not actively being worked on. If you are working on this bug, please mark yourself as the owner and move back to Assigned. Please see https://goo.gl/78kbny for more details. Please remove the Services>SignIn or UI>Browser>Profiles components if this bug isn't related to Chrome Identity.

For more details visit https://www.chromium.org/issue-tracking/autotriage - Your friendly Sheriffbot

Sign in to add a comment