cobalt icon indicating copy to clipboard operation
cobalt copied to clipboard

Add base::Move support.

Open aee-google opened this issue 1 year ago • 2 comments

b/316404107

aee-google avatar Jan 24 '24 18:01 aee-google

Codecov Report

Attention: 3 lines in your changes are missing coverage. Please review.

Comparison is base (61c20a2) 58.53% compared to head (3bb0c9a) 58.55%. Report is 16 commits behind head on main.

:exclamation: Current head 3bb0c9a differs from pull request most recent head 680bc25. Consider uploading reports for the commit 680bc25 to get more accurate results

Files Patch % Lines
starboard/shared/posix/impl/file_rename.h 76.92% 3 Missing :warning:
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2276      +/-   ##
==========================================
+ Coverage   58.53%   58.55%   +0.01%     
==========================================
  Files        1904     1906       +2     
  Lines       94522    94538      +16     
==========================================
+ Hits        55328    55355      +27     
+ Misses      39194    39183      -11     

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

codecov[bot] avatar Jan 24 '24 19:01 codecov[bot]

I'm worried about introducing a new starboard API for this—I was hoping to just have base::Move fail if we were moving a directory and otherwise basically just call base::CopyFile then base::DeleteFile so we would not have to change the places where base::Move is used (afaics the only places where a directory is moved is in a unittest?). That said, this is a much better long term solution, and I assume at some point we'd want to fully implement the functionality the more Chromium elements we take (as I assume the directory moving functionality is used elsewhere upstream).

@y4vor, do you have any thoughts on introducing a new Starboard API for this? Are there security implications that might disallow this for Starboard? Should we instead be adding the posix rename function to the API?

andrewsavage1 avatar Jan 25 '24 01:01 andrewsavage1