The Physical Web scanning api doesn't allow clients to request scan policies. It'd be nice if they could.
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/73b7f2fce6f5ef21212bb6482fd5cfa7ec9344f6 commit 73b7f2fce6f5ef21212bb6482fd5cfa7ec9344f6 Author: cco3 <cco3@chromium.org> Date: Tue Mar 21 00:34:47 2017 Add PhysicalWeb.updateScans() This updateScans method simplifies the environment checks needed before beginning or ending a scan. Instead of each code path that may begin or end a scan checking permissions by itself, based on what event has just occurred, this method will check and update scans as needed. This paves the way for an upgraded scanning API that will let client code to the Physical Web request different scan policies. On each request, we will be able to simply call updateScans(). BUG= 703308 Review-Url: https://codereview.chromium.org/2762733002 Cr-Commit-Position: refs/heads/master@{#458254} [modify] https://crrev.com/73b7f2fce6f5ef21212bb6482fd5cfa7ec9344f6/chrome/android/java/src/org/chromium/chrome/browser/physicalweb/PhysicalWeb.java [modify] https://crrev.com/73b7f2fce6f5ef21212bb6482fd5cfa7ec9344f6/chrome/android/java/src/org/chromium/chrome/browser/preferences/privacy/PhysicalWebPreferenceFragment.java [modify] https://crrev.com/73b7f2fce6f5ef21212bb6482fd5cfa7ec9344f6/chrome/android/java/src/org/chromium/chrome/browser/preferences/privacy/PrivacyPreferencesManager.java
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/1c16fca164db734cdafd0a428423392dbd3a93ab commit 1c16fca164db734cdafd0a428423392dbd3a93ab Author: cco3 <cco3@chromium.org> Date: Fri Mar 24 19:09:53 2017 Associate a scan mode with Physical Web listeners Instead of having a blanket scanning policy, it would be nice if client code could specify the kind of scan required. This change lets Physical Web listeners specify a scan mode when they register. This mode is recorded, but not currently used. A followup CL will surface this to the platform layer where Android/iOS can use it appropriately. BUG= 703308 Review-Url: https://codereview.chromium.org/2765713002 Cr-Commit-Position: refs/heads/master@{#459507} [modify] https://crrev.com/1c16fca164db734cdafd0a428423392dbd3a93ab/components/ntp_snippets/physical_web_pages/physical_web_page_suggestions_provider.cc [modify] https://crrev.com/1c16fca164db734cdafd0a428423392dbd3a93ab/components/physical_web/data_source/fake_physical_web_data_source.cc [modify] https://crrev.com/1c16fca164db734cdafd0a428423392dbd3a93ab/components/physical_web/data_source/fake_physical_web_data_source.h [modify] https://crrev.com/1c16fca164db734cdafd0a428423392dbd3a93ab/components/physical_web/data_source/physical_web_data_source.h [modify] https://crrev.com/1c16fca164db734cdafd0a428423392dbd3a93ab/components/physical_web/data_source/physical_web_data_source_impl.cc [modify] https://crrev.com/1c16fca164db734cdafd0a428423392dbd3a93ab/components/physical_web/data_source/physical_web_data_source_impl.h [modify] https://crrev.com/1c16fca164db734cdafd0a428423392dbd3a93ab/components/physical_web/data_source/physical_web_data_source_impl_unittest.cc
Comment 1 by bugdroid1@chromium.org
, Mar 21 2017