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

Issue 811679 link

Starred by 3 users

Issue metadata

Status: Assigned
Owner:
Last visit > 30 days ago
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Chrome
Pri: 3
Type: Task

Blocking:
issue 816678



Sign in to add a comment

Migrate callers of ConvertPathToArcUrl to using ConvertToContentUrl (async) instead

Project Member Reported by niwa@chromium.org, Feb 13 2018

Issue description

file_manager::util::ConvertPathToArcUrl is marked as deprecated because it's known that this function can't handle file paths under ARC media directories (/special/arc-documents-provider).

The function is currently called from 3 places (exo_parts.cc, note_taking_helper.cc, arc_file_tasks.cc).

We should migrate these 3 places to using the new async function file_manager::util::ConvertToContentUrlinstead and remove ConvertPathToArcUrl.
 

Comment 1 by niwa@chromium.org, Feb 13 2018

Summary: Migrate callers of ConvertPathToArcUrl to using ConvertToContentUrl (async) instead (was: Deprecate ConvertPathToArcUrl and )
Status: Available (was: Untriaged)
<files-triage> Available for work
Project Member

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

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

commit e40eeeb5ac1c7868b3e0050143ecf43a648bfdea
Author: Satoshi Niwa <niwa@google.com>
Date: Mon Feb 19 10:36:10 2018

Migrate exo_parts/data_offer to using ConvertToContentUrl (async function)

ConvertToContentUrl is a new async function being added by crrev.com/c/906222
It can handle ARC media URLs that the existing function can't handle.

Bug: chromium:767982
Bug: chromium:811679
Test: out/Default/exo_unittests --gtest_filter="DataOffer.*"
Change-Id: Ibfacfe3ce86687b45b2f60ed18d6dfefbbe6f685
Reviewed-on: https://chromium-review.googlesource.com/910540
Reviewed-by: Shuhei Takahashi <nya@chromium.org>
Reviewed-by: David Reveman <reveman@chromium.org>
Commit-Queue: Satoshi Niwa <niwa@chromium.org>
Cr-Commit-Position: refs/heads/master@{#537620}
[modify] https://crrev.com/e40eeeb5ac1c7868b3e0050143ecf43a648bfdea/chrome/browser/exo_parts.cc
[modify] https://crrev.com/e40eeeb5ac1c7868b3e0050143ecf43a648bfdea/components/exo/data_device_unittest.cc
[modify] https://crrev.com/e40eeeb5ac1c7868b3e0050143ecf43a648bfdea/components/exo/data_offer.cc
[modify] https://crrev.com/e40eeeb5ac1c7868b3e0050143ecf43a648bfdea/components/exo/data_offer.h
[modify] https://crrev.com/e40eeeb5ac1c7868b3e0050143ecf43a648bfdea/components/exo/data_offer_unittest.cc
[modify] https://crrev.com/e40eeeb5ac1c7868b3e0050143ecf43a648bfdea/components/exo/display_unittest.cc
[modify] https://crrev.com/e40eeeb5ac1c7868b3e0050143ecf43a648bfdea/components/exo/file_helper.h

Comment 4 by sashab@chromium.org, Feb 22 2018

Labels: CrOS-FilesApp-CodeHealth

Comment 5 by sashab@chromium.org, Feb 24 2018

Labels: -CrOS-FilesApp-CodeHealth CrOS-FilesApp

Comment 6 by sashab@chromium.org, Feb 28 2018

Labels: -CrOS-FilesApp

Comment 7 by hirono@chromium.org, Mar 22 2018

Blocking: 802169

Comment 8 by hirono@chromium.org, Mar 22 2018

Cc: hashimoto@chromium.org abod...@chromium.org joelhockey@chromium.org weifangsun@chromium.org dhadd...@chromium.org sdantul...@chromium.org
 Issue 748186  has been merged into this issue.
Owner: niwa@chromium.org
Status: Assigned (was: Available)
niwa@, can I assign this to you? This is blocking  issue 802169  which you own.

Comment 10 by niwa@chromium.org, Mar 28 2018

Sure, will work on this.
Blocking: -802169
Blocking: 816678
Project Member

Comment 13 by bugdroid1@chromium.org, Apr 2 2018

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

commit aa4f22e9700638adbb5cf140784b84036083e5f0
Author: Satoshi Niwa <niwa@google.com>
Date: Mon Apr 02 03:08:24 2018

Update path_util::ConvertToContentUrl to handling multiple URLs at a time.

Background:
* We are migrating callers of ConvertPathToArcUrl (sync) to using ConvertToContentUrl (async) instead.
* exo_parts.cc (a caller of ConvertToContentUrl) needs to handle multiple URLs at a time,
  so it converts single-URL callbacks to multiple-URLs callback using BarrierClosure.
* It turns out arc_file_tasks.cc (a caller of ConvertPathToArcUrl) also needs to handle multiple URLs at a time.
* Moving the BarrierClosure logic from exo_parts to path_util, so we don't need to duplicate the same BarrierClosure logic in arc_file_tasks after migration.

Bug: chromium:811679
Test: unit_test
Change-Id: I461651bac3e5110afdd7b97d39576436cb3a92fd
Reviewed-on: https://chromium-review.googlesource.com/983335
Reviewed-by: David Reveman <reveman@chromium.org>
Reviewed-by: Daichi Hirono <hirono@chromium.org>
Reviewed-by: Shuhei Takahashi <nya@chromium.org>
Commit-Queue: Satoshi Niwa <niwa@chromium.org>
Cr-Commit-Position: refs/heads/master@{#547406}
[modify] https://crrev.com/aa4f22e9700638adbb5cf140784b84036083e5f0/chrome/browser/chromeos/file_manager/path_util.cc
[modify] https://crrev.com/aa4f22e9700638adbb5cf140784b84036083e5f0/chrome/browser/chromeos/file_manager/path_util.h
[modify] https://crrev.com/aa4f22e9700638adbb5cf140784b84036083e5f0/chrome/browser/chromeos/file_manager/path_util_unittest.cc
[modify] https://crrev.com/aa4f22e9700638adbb5cf140784b84036083e5f0/chrome/browser/exo_parts.cc

Project Member

Comment 14 by bugdroid1@chromium.org, Apr 2 2018

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

commit f8ad0975f1c66b384f3bbb6ccd93b3831e0d98d3
Author: Satoshi Niwa <niwa@google.com>
Date: Mon Apr 02 04:56:05 2018

Migrate file_manager/arc_file_tasks to using async version of ConvertToContentUrls

Bug: chromium:811679
Bug:  chromium:816678 
Bug: b:76128680
Test: Manually tested steps in b:76128680

Change-Id: Ia997588424e90af97aac2f89de1fe1e84266b6fc
Reviewed-on: https://chromium-review.googlesource.com/987634
Reviewed-by: Shuhei Takahashi <nya@chromium.org>
Reviewed-by: Daichi Hirono <hirono@chromium.org>
Commit-Queue: Satoshi Niwa <niwa@chromium.org>
Cr-Commit-Position: refs/heads/master@{#547411}
[modify] https://crrev.com/f8ad0975f1c66b384f3bbb6ccd93b3831e0d98d3/chrome/browser/chromeos/file_manager/arc_file_tasks.cc
[modify] https://crrev.com/f8ad0975f1c66b384f3bbb6ccd93b3831e0d98d3/chrome/browser/chromeos/file_manager/arc_file_tasks.h
[modify] https://crrev.com/f8ad0975f1c66b384f3bbb6ccd93b3831e0d98d3/chrome/browser/chromeos/file_manager/file_tasks.cc

Cc: yusukes@chromium.org
Labels: M-67
niwa@ - Just checking in, was this fixed in M67? (I see the last commit was prior to branch)

Comment 16 by niwa@chromium.org, Apr 20 2018

Not yet. The goal of this bug is to update all of 3 callers of ConvertPathToArcUrl below
(1) exo_parts.cc
(2) arc_file_tasks.cc
(3) note_taking_helper.cc

I fixed (1) and (2) for unblocking other dependent bugs.
I haven't fixed (3) yet and it's not blocking any other bugs.
Labels: -M-67
Got it, thanks for the update! Will remove the milestone in that case for now.
Components: -Platform>Apps>FileManager Platform>Apps>ARC

Sign in to add a comment