Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(86)

Issue 1231493002: mandoline filesystem: Save cookie data to the mojo:filesystem. (Closed)

Created:
5 years, 5 months ago by Elliot Glaysher
Modified:
5 years, 5 months ago
CC:
chromium-reviews, qsr+mojo_chromium.org, viettrungluu+watch_chromium.org, yzshen+watch_chromium.org, abarth-chromium, Aaron Boodman, darin (slow to review), ben+mojo_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

mandoline filesystem: Reland "Save cookie data to the mojo:filesystem." In addition to saving the cookies to the file system service (per the previous patch), we also modify the filesystem service to take a client. When the shell connection to the file system service is broken, instead of quitting immediately, we broadcast a shutdown notification to all of our clients, and wait for them to close the directory objects. This solves the timing problems during shutdown. BUG=493311 TBR=shess@chromium.org R=jam@chromium.org,erikwright@chromium.org First Review URL: https://codereview.chromium.org/1179413010 Committed: https://crrev.com/e3ec7c45bd64ef826fd3940c8a2302f5b55edc45 Cr-Commit-Position: refs/heads/master@{#338888}

Patch Set 1 #

Patch Set 2 : Rework the FilesystemService to notify users of shutdown. #

Patch Set 3 : Rebase to ToT for jam's core services patch. #

Total comments: 7

Patch Set 4 : nits + observers #

Total comments: 1

Patch Set 5 : Document Close() behaviour, add checks for usage after Close(), and tests. #

Patch Set 6 : Merge with ToT #

Total comments: 1
Unified diffs Side-by-side diffs Delta from patch set Stats (+947 lines, -63 lines) Patch
M components/filesystem/directory_impl.h View 1 1 chunk +4 lines, -0 lines 0 comments Download
M components/filesystem/file_system_app.h View 1 2 3 2 chunks +37 lines, -0 lines 0 comments Download
M components/filesystem/file_system_app.cc View 1 1 chunk +73 lines, -2 lines 0 comments Download
M components/filesystem/file_system_impl.h View 1 1 chunk +23 lines, -4 lines 0 comments Download
M components/filesystem/file_system_impl.cc View 1 3 chunks +115 lines, -5 lines 0 comments Download
M components/filesystem/files_test_base.h View 1 2 chunks +7 lines, -1 line 0 comments Download
M components/filesystem/files_test_base.cc View 1 2 chunks +9 lines, -2 lines 0 comments Download
M components/filesystem/public/interfaces/file_system.mojom View 1 1 chunk +14 lines, -1 line 0 comments Download
M mandoline/services/core_services/core_services_application_delegate.cc View 1 2 2 chunks +2 lines, -2 lines 0 comments Download
M mojo/application/public/cpp/application_delegate.h View 1 2 3 1 chunk +7 lines, -0 lines 0 comments Download
M mojo/application/public/cpp/lib/application_delegate.cc View 1 1 chunk +4 lines, -0 lines 0 comments Download
M mojo/application/public/cpp/lib/application_impl.cc View 1 2 3 4 1 chunk +8 lines, -1 line 0 comments Download
M mojo/runner/BUILD.gn View 1 2 3 4 5 1 chunk +2 lines, -0 lines 0 comments Download
M mojo/runner/context.h View 1 2 3 4 2 chunks +2 lines, -0 lines 0 comments Download
A mojo/runner/scoped_user_data_dir.h View 1 chunk +28 lines, -0 lines 0 comments Download
A mojo/runner/scoped_user_data_dir.cc View 1 chunk +40 lines, -0 lines 0 comments Download
M mojo/runner/switches.h View 1 chunk +2 lines, -0 lines 0 comments Download
M mojo/runner/switches.cc View 1 chunk +8 lines, -0 lines 0 comments Download
M mojo/services/network/BUILD.gn View 1 2 3 4 5 3 chunks +4 lines, -0 lines 0 comments Download
M mojo/services/network/DEPS View 1 chunk +3 lines, -0 lines 0 comments Download
M mojo/services/network/main.cc View 1 1 chunk +1 line, -1 line 0 comments Download
A mojo/services/network/mojo_persistent_cookie_store.h View 1 2 3 1 chunk +64 lines, -0 lines 0 comments Download
A mojo/services/network/mojo_persistent_cookie_store.cc View 1 2 3 1 chunk +100 lines, -0 lines 0 comments Download
M mojo/services/network/network_context.h View 1 3 chunks +10 lines, -2 lines 0 comments Download
M mojo/services/network/network_context.cc View 1 5 chunks +30 lines, -4 lines 0 comments Download
M mojo/services/network/network_service_delegate.h View 1 3 chunks +38 lines, -1 line 0 comments Download
M mojo/services/network/network_service_delegate.cc View 1 2 3 3 chunks +136 lines, -5 lines 0 comments Download
A mojo/services/network/network_service_delegate_observer.h View 1 1 chunk +24 lines, -0 lines 0 comments Download
M mojo/tools/mopy/gtest.py View 1 chunk +5 lines, -4 lines 0 comments Download
M net/extras/sqlite/sqlite_persistent_cookie_store.h View 1 2 3 4 1 chunk +7 lines, -0 lines 0 comments Download
M net/extras/sqlite/sqlite_persistent_cookie_store.cc View 1 2 3 4 6 chunks +43 lines, -17 lines 0 comments Download
M net/extras/sqlite/sqlite_persistent_cookie_store_unittest.cc View 1 2 3 4 3 chunks +37 lines, -3 lines 0 comments Download
M sql/mojo/mojo_vfs.cc View 1 3 chunks +19 lines, -2 lines 1 comment Download
M sql/mojo/sql_test_base.h View 1 3 chunks +6 lines, -1 line 0 comments Download
M sql/mojo/sql_test_base.cc View 1 3 chunks +10 lines, -2 lines 0 comments Download
M sql/mojo/vfs_unittest.cc View 1 4 chunks +25 lines, -3 lines 0 comments Download

Messages

Total messages: 17 (5 generated)
Elliot Glaysher
jam: Patch 1 was the original patch, patchset 2 are the modifications that control lifetime. ...
5 years, 5 months ago (2015-07-10 17:45:34 UTC) #2
Elliot Glaysher
ping
5 years, 5 months ago (2015-07-10 23:05:47 UTC) #3
jam
lgtm https://codereview.chromium.org/1231493002/diff/40001/components/filesystem/file_system_app.h File components/filesystem/file_system_app.h (right): https://codereview.chromium.org/1231493002/diff/40001/components/filesystem/file_system_app.h#newcode33 components/filesystem/file_system_app.h:33: // actually take a nit: rest of comment? ...
5 years, 5 months ago (2015-07-13 15:48:33 UTC) #4
Elliot Glaysher
erikwright: please review net/extras/sqlite/ The change I made here is a simple way to block ...
5 years, 5 months ago (2015-07-13 18:01:41 UTC) #6
erikwright (departed)
https://codereview.chromium.org/1231493002/diff/60001/net/extras/sqlite/sqlite_persistent_cookie_store.h File net/extras/sqlite/sqlite_persistent_cookie_store.h (right): https://codereview.chromium.org/1231493002/diff/60001/net/extras/sqlite/sqlite_persistent_cookie_store.h#newcode52 net/extras/sqlite/sqlite_persistent_cookie_store.h:52: // thread. Add documentation about how this affects the ...
5 years, 5 months ago (2015-07-14 15:04:49 UTC) #7
Elliot Glaysher
Updated documentation, ignored calls once Close() was called, and added tests to make sure that ...
5 years, 5 months ago (2015-07-14 20:58:42 UTC) #8
Elliot Glaysher
ping erikwright
5 years, 5 months ago (2015-07-15 17:45:17 UTC) #9
erikwright (departed)
LGTM.
5 years, 5 months ago (2015-07-15 17:52:04 UTC) #10
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1231493002/100001
5 years, 5 months ago (2015-07-15 18:00:41 UTC) #13
commit-bot: I haz the power
Committed patchset #6 (id:100001)
5 years, 5 months ago (2015-07-15 18:31:01 UTC) #14
commit-bot: I haz the power
Patchset 6 (id:??) landed as https://crrev.com/e3ec7c45bd64ef826fd3940c8a2302f5b55edc45 Cr-Commit-Position: refs/heads/master@{#338888}
5 years, 5 months ago (2015-07-15 18:32:03 UTC) #15
Scott Hess - ex-Googler
5 years, 5 months ago (2015-07-21 21:55:24 UTC) #17
Message was sent while issue was closed.
lgtm

https://codereview.chromium.org/1231493002/diff/100001/sql/mojo/mojo_vfs.cc
File sql/mojo/mojo_vfs.cc (right):

https://codereview.chromium.org/1231493002/diff/100001/sql/mojo/mojo_vfs.cc#n...
sql/mojo/mojo_vfs.cc:208: // so not leaving a NOTIMPLEMENTED().)
I think "return 0;" is a fine implementation of this.  Any other implementation
either needs to reflect per-platform characteristics or requires guarantees from
the implementation.

Reading the Windows and Unix implementations makes me think this probably makes
sense:
  return SQLITE_IOCAP_UNDELETABLE_WHEN_OPEN |
      SQLITE_IOCAP_POWERSAFE_OVERWRITE;
The first is technically not true for Unix, but I think that it will work fine.

Powered by Google App Engine
This is Rietveld 408576698