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

Issue 2384413003: Revert of Refactor WebappRegistry into a singleton instance. (Closed)

Created:
4 years, 2 months ago by Peng
Modified:
4 years, 2 months ago
CC:
chromium-reviews, dominickn+watch_chromium.org, markusheintz_, msramek+watch_chromium.org
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Revert of Refactor WebappRegistry into a singleton instance. (patchset #11 id:200001 of https://codereview.chromium.org/2351113005/ ) Reason for revert: chrome_public_test_apk failed. https://uberchromegw.corp.google.com/i/chromium.linux/builders/Android%20Tests%20%28dbg%29/builds/36476 Original issue's description: > Refactor WebappRegistry into a singleton instance. > > This CL refactors WebappRegistry and WebappDataStorage to make most of > the methods synchronous. WebappRegistry is now a singleton instance that > is instantiated at browser startup. This allows all SharedPreferences files to > be pre-warmed before the class is used; new web apps open new > SharedPreferences on a background thread when registered, after which the > preferences are cached automatically. > > Most static methods on WebappRegistry and WebappDataStorage have been > converted to instance methods or removed. This makes the code much > cleaner and more efficient; each static method had to independently open > their SharedPreferences, which minimally performs a stat() on the > underlying XML file to see if it has changed. Now the singleton > WebappRegistry caches all WebappDataStorage objects on startup and > whenever new ones are added. This reduces disk IO overhead. > > This CL allows all calls to SharedPreferences.Editor.apply() in > WebappRegistry and WebappDataStorage to occur on the main thread, > mostly removing the need for unwieldy callback interfaces and bare > pointer passing across the JNI. > > BUG=633791 > > Committed: https://crrev.com/78cf6596040662c0a73c0e4038bc84fb2b3c470a > Cr-Commit-Position: refs/heads/master@{#422703} TBR=dfalcantara@chromium.org,wnwen@chromium.org,msramek@chromium.org,dominickn@chromium.org # Skipping CQ checks because original CL landed less than 1 days ago. NOPRESUBMIT=true NOTREECHECKS=true NOTRY=true BUG=633791 Committed: https://crrev.com/83ff6feda1e62ebbdaac19a8ebdd473d9dfd398a Cr-Commit-Position: refs/heads/master@{#422763}

Patch Set 1 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+1151 lines, -729 lines) Patch
M chrome/android/java/src/org/chromium/chrome/browser/DeferredStartupHandler.java View 3 chunks +0 lines, -15 lines 0 comments Download
M chrome/android/java/src/org/chromium/chrome/browser/ServiceTabLauncher.java View 2 chunks +41 lines, -37 lines 0 comments Download
M chrome/android/java/src/org/chromium/chrome/browser/ShortcutHelper.java View 3 chunks +12 lines, -4 lines 0 comments Download
M chrome/android/java/src/org/chromium/chrome/browser/notifications/NotificationService.java View 2 chunks +0 lines, -14 lines 0 comments Download
M chrome/android/java/src/org/chromium/chrome/browser/webapps/WebApkActivity.java View 1 chunk +1 line, -1 line 0 comments Download
M chrome/android/java/src/org/chromium/chrome/browser/webapps/WebApkUpdateManager.java View 3 chunks +35 lines, -22 lines 0 comments Download
M chrome/android/java/src/org/chromium/chrome/browser/webapps/WebappActivity.java View 4 chunks +29 lines, -31 lines 0 comments Download
M chrome/android/java/src/org/chromium/chrome/browser/webapps/WebappDataStorage.java View 12 chunks +201 lines, -131 lines 0 comments Download
M chrome/android/java/src/org/chromium/chrome/browser/webapps/WebappRegistry.java View 3 chunks +255 lines, -216 lines 0 comments Download
M chrome/android/java_sources.gni View 1 chunk +0 lines, -1 line 0 comments Download
M chrome/android/javatests/src/org/chromium/chrome/browser/browsing_data/BrowsingDataRemoverIntegrationTest.java View 6 chunks +39 lines, -10 lines 0 comments Download
M chrome/android/javatests/src/org/chromium/chrome/browser/preferences/privacy/ClearBrowsingDataPreferencesTest.java View 7 chunks +90 lines, -22 lines 0 comments Download
D chrome/android/javatests/src/org/chromium/chrome/browser/webapps/TestFetchStorageCallback.java View 1 chunk +0 lines, -25 lines 0 comments Download
M chrome/android/javatests/src/org/chromium/chrome/browser/webapps/WebappActivityTestBase.java View 1 chunk +1 line, -2 lines 0 comments Download
M chrome/android/javatests/src/org/chromium/chrome/browser/webapps/WebappModeTest.java View 2 chunks +2 lines, -3 lines 0 comments Download
M chrome/android/javatests/src/org/chromium/chrome/browser/webapps/WebappSplashScreenTest.java View 5 chunks +11 lines, -58 lines 0 comments Download
M chrome/android/junit/src/org/chromium/chrome/browser/webapps/WebappDataStorageTest.java View 8 chunks +34 lines, -13 lines 0 comments Download
M chrome/android/junit/src/org/chromium/chrome/browser/webapps/WebappRegistryTest.java View 26 chunks +289 lines, -105 lines 0 comments Download
M chrome/browser/android/chrome_jni_registrar.cc View 2 chunks +2 lines, -0 lines 0 comments Download
M chrome/browser/android/webapps/webapp_registry.h View 2 chunks +9 lines, -2 lines 0 comments Download
M chrome/browser/android/webapps/webapp_registry.cc View 1 chunk +52 lines, -8 lines 0 comments Download
M chrome/browser/browsing_data/browsing_data_remover.h View 2 chunks +8 lines, -0 lines 0 comments Download
M chrome/browser/browsing_data/browsing_data_remover.cc View 4 chunks +30 lines, -5 lines 0 comments Download
M chrome/browser/browsing_data/browsing_data_remover_unittest.cc View 1 chunk +10 lines, -4 lines 0 comments Download

Messages

Total messages: 7 (3 generated)
Peng
Created Revert of Refactor WebappRegistry into a singleton instance.
4 years, 2 months ago (2016-10-04 12:16:16 UTC) #2
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2384413003/1
4 years, 2 months ago (2016-10-04 12:16:24 UTC) #3
commit-bot: I haz the power
Committed patchset #1 (id:1)
4 years, 2 months ago (2016-10-04 12:17:30 UTC) #5
commit-bot: I haz the power
4 years, 2 months ago (2016-10-04 12:19:15 UTC) #7
Message was sent while issue was closed.
Patchset 1 (id:??) landed as
https://crrev.com/83ff6feda1e62ebbdaac19a8ebdd473d9dfd398a
Cr-Commit-Position: refs/heads/master@{#422763}

Powered by Google App Engine
This is Rietveld 408576698