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

Issue 12706012: chromeos: Destruct DriveResourceMetadata on the blocking pool (Closed)

Created:
7 years, 9 months ago by hashimoto
Modified:
7 years, 9 months ago
Reviewers:
hidehiko
CC:
chromium-reviews, nkostylev+watch_chromium.org, tzik+watch_chromium.org, achuith+watch_chromium.org, oshima+watch_chromium.org, kinuko+watch, stevenjb+watch_chromium.org, davemoore+watch_chromium.org
Visibility:
Public.

Description

chromeos: Destruct DriveResourceMetadata on the blocking pool Make DriveResourceMetadata's dtor private, add Destroy(). Add DestroyHelper to drive_file_system_util.h Add DestroyHelperForTests to drive_test_util.h and replace DeleteDriveCache with it. After switching to DB storage, DriveResourceMetadata will post tasks to the blocking pool. Since we'd like to avoid locking the UI thread, we don't want to wait for the completion of tasks on the blocking pool. It means that DriveResourceMetadata must live longer than any tasks posted on the blocking pool. To achieve this, we post a task to delete DriveResourceMetadata on the blocking pool like DriveCache. BUG=147299 TEST=unit_tests Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=188818

Patch Set 1 : _ #

Total comments: 8

Patch Set 2 : Review fix #

Patch Set 3 : rebase #

Patch Set 4 : Add note #

Unified diffs Side-by-side diffs Delta from patch set Stats (+141 lines, -105 lines) Patch
M chrome/browser/chromeos/drive/drive_cache_unittest.cc View 1 4 chunks +7 lines, -10 lines 0 comments Download
M chrome/browser/chromeos/drive/drive_file_system.h View 1 2 chunks +2 lines, -1 line 0 comments Download
M chrome/browser/chromeos/drive/drive_file_system_unittest.cc View 1 2 10 chunks +16 lines, -16 lines 0 comments Download
M chrome/browser/chromeos/drive/drive_file_system_util.h View 1 2 chunks +10 lines, -0 lines 0 comments Download
M chrome/browser/chromeos/drive/drive_resource_metadata.h View 2 chunks +10 lines, -1 line 0 comments Download
M chrome/browser/chromeos/drive/drive_resource_metadata.cc View 2 chunks +19 lines, -1 line 0 comments Download
M chrome/browser/chromeos/drive/drive_resource_metadata_unittest.cc View 1 9 chunks +39 lines, -24 lines 0 comments Download
M chrome/browser/chromeos/drive/drive_sync_client_unittest.cc View 1 4 chunks +5 lines, -5 lines 0 comments Download
M chrome/browser/chromeos/drive/drive_system_service.h View 1 3 chunks +2 lines, -7 lines 0 comments Download
M chrome/browser/chromeos/drive/drive_system_service.cc View 1 chunk +0 lines, -7 lines 0 comments Download
M chrome/browser/chromeos/drive/drive_test_util.h View 1 2 3 1 chunk +12 lines, -3 lines 0 comments Download
M chrome/browser/chromeos/drive/drive_test_util.cc View 1 chunk +0 lines, -7 lines 0 comments Download
M chrome/browser/chromeos/drive/file_system/create_directory_operation_unittest.cc View 1 3 chunks +7 lines, -10 lines 0 comments Download
M chrome/browser/chromeos/drive/search_metadata_unittest.cc View 1 3 chunks +5 lines, -5 lines 0 comments Download
M chrome/browser/chromeos/drive/stale_cache_files_remover_unittest.cc View 1 4 chunks +7 lines, -8 lines 0 comments Download

Messages

Total messages: 7 (0 generated)
hashimoto
Please review. This change depends on https://codereview.chromium.org/12679008/ ("chromeos: Stop dealing with metadata proto from DriveFileSystemTest")
7 years, 9 months ago (2013-03-18 09:46:55 UTC) #1
hidehiko
https://codereview.chromium.org/12706012/diff/3016/chrome/browser/chromeos/drive/drive_file_system_util.h File chrome/browser/chromeos/drive/drive_file_system_util.h (right): https://codereview.chromium.org/12706012/diff/3016/chrome/browser/chromeos/drive/drive_file_system_util.h#newcode144 chrome/browser/chromeos/drive/drive_file_system_util.h:144: template<typename T> How about: struct DestroyHelper { template<typename T> ...
7 years, 9 months ago (2013-03-18 13:16:28 UTC) #2
hashimoto
https://codereview.chromium.org/12706012/diff/3016/chrome/browser/chromeos/drive/drive_file_system_util.h File chrome/browser/chromeos/drive/drive_file_system_util.h (right): https://codereview.chromium.org/12706012/diff/3016/chrome/browser/chromeos/drive/drive_file_system_util.h#newcode144 chrome/browser/chromeos/drive/drive_file_system_util.h:144: template<typename T> On 2013/03/18 13:16:28, hidehiko wrote: > How ...
7 years, 9 months ago (2013-03-18 13:40:10 UTC) #3
hidehiko
lgtm with a nitpick. https://codereview.chromium.org/12706012/diff/3016/chrome/browser/chromeos/drive/drive_test_util.h File chrome/browser/chromeos/drive/drive_test_util.h (right): https://codereview.chromium.org/12706012/diff/3016/chrome/browser/chromeos/drive/drive_test_util.h#newcode172 chrome/browser/chromeos/drive/drive_test_util.h:172: // Helper to destroy objects ...
7 years, 9 months ago (2013-03-18 13:57:44 UTC) #4
hashimoto
https://codereview.chromium.org/12706012/diff/3016/chrome/browser/chromeos/drive/drive_test_util.h File chrome/browser/chromeos/drive/drive_test_util.h (right): https://codereview.chromium.org/12706012/diff/3016/chrome/browser/chromeos/drive/drive_test_util.h#newcode172 chrome/browser/chromeos/drive/drive_test_util.h:172: // Helper to destroy objects which needs Destroy() to ...
7 years, 9 months ago (2013-03-18 15:15:34 UTC) #5
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/hashimoto@chromium.org/12706012/19001
7 years, 9 months ago (2013-03-18 15:27:01 UTC) #6
commit-bot: I haz the power
7 years, 9 months ago (2013-03-18 21:07:46 UTC) #7
Message was sent while issue was closed.
Change committed as 188818

Powered by Google App Engine
This is Rietveld 408576698