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

Issue 275103004: ServiceWorker: Database functions should return status code instead of boolean (Closed)

Created:
6 years, 7 months ago by nhiroki
Modified:
6 years, 7 months ago
CC:
chromium-reviews, jsbell+serviceworker_chromium.org, tzik, serviceworker-reviews, jam, nhiroki, darin-cc_chromium.org, horo+watch_chromium.org, kinuko+watch, alecflett+watch_chromium.org
Visibility:
Public.

Description

ServiceWorker: Database functions should return status code instead of boolean Currently to get an error reason (not found, database corruption, ...), we have to check is_disabled() and was_corruption_detected() after database operations. It's a bit messy for the storage class because these functions must be called on the database task runner. This change makes database functions return status code instead of boolean. Other remaining functions will be modified like this in following CLs. BUG=372704 TEST=should pass all existing tests (no behavioral changes)

Patch Set 1 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+84 lines, -46 lines) Patch
M content/browser/service_worker/service_worker_database.h View 2 chunks +9 lines, -6 lines 0 comments Download
M content/browser/service_worker/service_worker_database.cc View 7 chunks +38 lines, -20 lines 0 comments Download
M content/browser/service_worker/service_worker_database_unittest.cc View 8 chunks +10 lines, -9 lines 0 comments Download
M content/browser/service_worker/service_worker_registration_status.cc View 1 chunk +1 line, -0 lines 0 comments Download
M content/browser/service_worker/service_worker_storage.h View 1 chunk +1 line, -1 line 0 comments Download
M content/browser/service_worker/service_worker_storage.cc View 3 chunks +20 lines, -10 lines 0 comments Download
M content/common/service_worker/service_worker_status_code.h View 1 chunk +3 lines, -0 lines 0 comments Download
M content/common/service_worker/service_worker_status_code.cc View 1 chunk +2 lines, -0 lines 0 comments Download

Messages

Total messages: 9 (0 generated)
nhiroki
michaeln@ (or anyone), can you review this? Thanks!
6 years, 7 months ago (2014-05-13 08:28:41 UTC) #1
jsbell
lgtm
6 years, 7 months ago (2014-05-13 11:22:06 UTC) #2
nhiroki
The CQ bit was checked by nhiroki@chromium.org
6 years, 7 months ago (2014-05-13 12:18:01 UTC) #3
nhiroki
The CQ bit was unchecked by nhiroki@chromium.org
6 years, 7 months ago (2014-05-13 12:18:06 UTC) #4
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/nhiroki@chromium.org/275103004/1
6 years, 7 months ago (2014-05-13 12:18:09 UTC) #5
michaeln
lgtm2
6 years, 7 months ago (2014-05-13 20:38:47 UTC) #6
nhiroki
The CQ bit was checked by nhiroki@chromium.org
6 years, 7 months ago (2014-05-13 23:18:53 UTC) #7
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/nhiroki@chromium.org/275103004/1
6 years, 7 months ago (2014-05-13 23:20:22 UTC) #8
commit-bot: I haz the power
6 years, 7 months ago (2014-05-13 23:24:37 UTC) #9
Message was sent while issue was closed.
Change committed as 270240

Powered by Google App Engine
This is Rietveld 408576698