New issue
Advanced search Search tips

Issue 836464 link

Starred by 1 user

Issue metadata

Status: Verified
Owner:
Closed: May 2018
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Android
Pri: 3
Type: Task



Sign in to add a comment

init(context, observer) -> init(observer)

Project Member Reported by vakh@chromium.org, Apr 24 2018

Issue description

https://crrev.com/i/612249 replaces the usage of mContext with ContextUtils.getApplicationContext()

In the process, it introduces:
public boolean init(Observer observer)

which can now replace:
public boolean init(Context context, Observer observer)

This needs to be done for Clank and for WebView.
 
Project Member

Comment 1 by bugdroid1@chromium.org, Apr 30 2018

The following revision refers to this bug:
  https://chrome-internal.googlesource.com/clank/internal/apps/+/86c78c342e78f02a05f122599867cfa858d8ccd6

commit 86c78c342e78f02a05f122599867cfa858d8ccd6
Author: Nate Fischer <ntfschr@google.com>
Date: Mon Apr 30 22:54:22 2018

Project Member

Comment 2 by bugdroid1@chromium.org, May 1 2018

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

commit 42d5c3f3adddd25fa3f09145f49e58df03fec0d9
Author: Nate Fischer <ntfschr@chromium.org>
Date: Tue May 01 01:47:36 2018

SafeBrowsing: require downstream to rely on ContextUtils

This is the second CL in a series to remove Context parameters from Safe
Browsing methods.

This removes Context parameters from SafeBrowsingApiHandler#init() and
querySafeBrowsingUserConsent(), requiring downstream to override the new
signatures and rely on ContextUtils.getApplicationContext().

This makes sure we don't pass the wrong Context (e.g., an Activity
Context), since GMS holding an Activity Context may cause an Activity
leak.

This intentionally does not change
PlatformServiceBridge#warmUpSafeBrowsing, because Android has specific
CTS requirements that we use that Context.

Bug:  836464 
Test: N/A
Change-Id: I2c0e7f9f43bbb3dd1fe8d7f7e2e4147e765c645e
Reviewed-on: https://chromium-review.googlesource.com/1034109
Reviewed-by: Changwan Ryu <changwan@chromium.org>
Reviewed-by: Varun Khaneja <vakh@chromium.org>
Reviewed-by: Maria Khomenko <mariakhomenko@chromium.org>
Commit-Queue: Nate Fischer <ntfschr@chromium.org>
Cr-Commit-Position: refs/heads/master@{#554964}
[modify] https://crrev.com/42d5c3f3adddd25fa3f09145f49e58df03fec0d9/android_webview/java/src/org/chromium/android_webview/AwSafeBrowsingConfigHelper.java
[modify] https://crrev.com/42d5c3f3adddd25fa3f09145f49e58df03fec0d9/android_webview/java/src/org/chromium/android_webview/PlatformServiceBridge.java
[modify] https://crrev.com/42d5c3f3adddd25fa3f09145f49e58df03fec0d9/android_webview/javatests/src/org/chromium/android_webview/test/SafeBrowsingTest.java
[modify] https://crrev.com/42d5c3f3adddd25fa3f09145f49e58df03fec0d9/chrome/android/javatests/src/org/chromium/chrome/browser/MockSafeBrowsingApiHandler.java
[modify] https://crrev.com/42d5c3f3adddd25fa3f09145f49e58df03fec0d9/components/safe_browsing/android/java/src/org/chromium/components/safe_browsing/SafeBrowsingApiBridge.java
[modify] https://crrev.com/42d5c3f3adddd25fa3f09145f49e58df03fec0d9/components/safe_browsing/android/java/src/org/chromium/components/safe_browsing/SafeBrowsingApiHandler.java

Project Member

Comment 3 by bugdroid1@chromium.org, May 3 2018

The following revision refers to this bug:
  https://chrome-internal.googlesource.com/clank/internal/apps/+/724ac867b5324cd77d26c6d6e6d7f4d029543e9f

commit 724ac867b5324cd77d26c6d6e6d7f4d029543e9f
Author: Nate Fischer <ntfschr@google.com>
Date: Thu May 03 01:05:35 2018

Status: Fixed (was: Assigned)
Do we need to manually verify ?. If not will do sanity testing .
No manual verification necessary. Sanity testing SGTM, thanks!
Status: Verified (was: Fixed)
Bulk edit: marking stale 'fixed' bugs as 'verified' since they don't need verification at this point.

Sign in to add a comment