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

Issue 2418813002: [Reland] Refactoring of SBER preference usage (Closed)

Created:
4 years, 2 months ago by lpz
Modified:
4 years, 2 months ago
CC:
chromium-reviews, asanka, extensions-reviews_chromium.org, blundell+watchlist_chromium.org, droger+watchlist_chromium.org, grt+watch_chromium.org, sdefresne+watchlist_chromium.org, tfarina, chromium-apps-reviews_chromium.org, dbeam+watch-downloads_chromium.org
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

[Reland] Refactoring of SBER preference usage, this time without introducing a static initializer in preference_api. This reverts commit 5ddd173bd9aef153574bbe4639fa190780c65348. [Original CL description] Refactoring usage of SBER preference. Moved (most of) the references of this pref into a shared util file, and updated calling code to use it. The vast majority of the code just cares about whether the opt-in is on or off. A handful of other code (mostly unittests) need the name of the pref so they can set it. The primary outliers are 1) profile.cc (where the pref is first registered by name), and 2) safe_browsing_service.cc (where it listens for changes to the pref). These may be handled in future refactoring. BUG=653122 Committed: https://crrev.com/cc1c0ce3a7ee43e7f4b87620899c0b7a41d2a9da Cr-Commit-Position: refs/heads/master@{#426565}

Patch Set 1 : Original CL #

Patch Set 2 : Fix static init in preference_api #

Total comments: 2

Patch Set 3 : Sync to head #

Patch Set 4 : Sync #

Unified diffs Side-by-side diffs Delta from patch set Stats (+202 lines, -139 lines) Patch
M chrome/browser/android/preferences/pref_service_bridge.cc View 3 chunks +4 lines, -4 lines 0 comments Download
M chrome/browser/extensions/BUILD.gn View 1 chunk +1 line, -0 lines 0 comments Download
M chrome/browser/extensions/api/preference/preference_api.cc View 1 2 chunks +2 lines, -2 lines 0 comments Download
M chrome/browser/interstitials/chrome_controller_client.cc View 2 chunks +2 lines, -1 line 0 comments Download
M chrome/browser/interstitials/security_interstitial_page.h View 2 chunks +4 lines, -0 lines 0 comments Download
M chrome/browser/interstitials/security_interstitial_page.cc View 1 chunk +5 lines, -3 lines 0 comments Download
M chrome/browser/profiles/profile.cc View 2 chunks +2 lines, -1 line 0 comments Download
M chrome/browser/safe_browsing/client_side_detection_host.cc View 2 chunks +2 lines, -3 lines 0 comments Download
M chrome/browser/safe_browsing/client_side_detection_service.cc View 2 chunks +2 lines, -2 lines 0 comments Download
M chrome/browser/safe_browsing/download_protection_service.cc View 5 chunks +7 lines, -11 lines 0 comments Download
M chrome/browser/safe_browsing/download_protection_service_unittest.cc View 3 chunks +3 lines, -4 lines 0 comments Download
M chrome/browser/safe_browsing/incident_reporting/extension_data_collection_unittest.cc View 2 chunks +2 lines, -1 line 0 comments Download
M chrome/browser/safe_browsing/incident_reporting/incident_reporting_service.cc View 7 chunks +8 lines, -14 lines 0 comments Download
M chrome/browser/safe_browsing/incident_reporting/incident_reporting_service_unittest.cc View 3 chunks +3 lines, -2 lines 0 comments Download
M chrome/browser/safe_browsing/incident_reporting/last_download_finder_unittest.cc View 2 chunks +2 lines, -1 line 0 comments Download
M chrome/browser/safe_browsing/local_database_manager.cc View 2 chunks +3 lines, -3 lines 0 comments Download
M chrome/browser/safe_browsing/safe_browsing_blocking_page.cc View 3 chunks +3 lines, -2 lines 0 comments Download
M chrome/browser/safe_browsing/safe_browsing_blocking_page_test.cc View 6 chunks +8 lines, -10 lines 0 comments Download
M chrome/browser/safe_browsing/safe_browsing_blocking_page_unittest.cc View 1 2 18 chunks +20 lines, -39 lines 0 comments Download
M chrome/browser/safe_browsing/safe_browsing_service.cc View 2 chunks +6 lines, -6 lines 0 comments Download
M chrome/browser/safe_browsing/srt_fetcher_browsertest_win.cc View 2 chunks +2 lines, -2 lines 0 comments Download
M chrome/browser/safe_browsing/srt_fetcher_win.cc View 2 chunks +2 lines, -2 lines 0 comments Download
M chrome/browser/safe_browsing/ui_manager.cc View 2 chunks +2 lines, -3 lines 0 comments Download
M chrome/browser/ssl/cert_report_helper.cc View 5 chunks +16 lines, -7 lines 0 comments Download
M chrome/browser/ssl/certificate_reporting_test_utils.cc View 1 2 3 2 chunks +2 lines, -2 lines 0 comments Download
M chrome/browser/ui/BUILD.gn View 1 2 3 1 chunk +1 line, -0 lines 0 comments Download
M chrome/browser/ui/views/download/download_feedback_dialog_view.cc View 3 chunks +4 lines, -3 lines 0 comments Download
M chrome/browser/ui/views/download/download_item_view.cc View 2 chunks +7 lines, -6 lines 0 comments Download
M chrome/common/pref_names.h View 1 2 3 1 chunk +0 lines, -1 line 0 comments Download
M chrome/common/pref_names.cc View 1 2 3 1 chunk +0 lines, -4 lines 0 comments Download
M components/safe_browsing_db/BUILD.gn View 2 chunks +12 lines, -0 lines 0 comments Download
M components/safe_browsing_db/DEPS View 1 chunk +1 line, -0 lines 0 comments Download
A components/safe_browsing_db/safe_browsing_prefs.h View 1 chunk +32 lines, -0 lines 0 comments Download
A components/safe_browsing_db/safe_browsing_prefs.cc View 1 chunk +32 lines, -0 lines 0 comments Download

Messages

Total messages: 52 (32 generated)
lpz
lazyboy@: please review c/b/extensions. I opted for a quick-fix just to reland this CL but ...
4 years, 2 months ago (2016-10-13 16:59:12 UTC) #7
lpz
miguelg@chromium.org: Please review changes in c/b/android/preferences mlerman@chromium.org: Please review changes in c/b/profiles msw@chromium.org: Please review ...
4 years, 2 months ago (2016-10-13 17:01:43 UTC) #9
Jialiu Lin
lgtm for c/b/safe_browsing
4 years, 2 months ago (2016-10-13 17:07:42 UTC) #10
msw
c/b/ui/views lgtm
4 years, 2 months ago (2016-10-13 17:14:56 UTC) #11
Mike Lerman
c/b/profiles LGTM
4 years, 2 months ago (2016-10-13 18:21:05 UTC) #12
estark
c/b/interstitials and c/b/ssl lgtm
4 years, 2 months ago (2016-10-13 21:11:17 UTC) #13
lazyboy
one quick q. https://codereview.chromium.org/2418813002/diff/20001/chrome/browser/extensions/api/preference/preference_api.cc File chrome/browser/extensions/api/preference/preference_api.cc (right): https://codereview.chromium.org/2418813002/diff/20001/chrome/browser/extensions/api/preference/preference_api.cc#newcode117 chrome/browser/extensions/api/preference/preference_api.cc:117: prefs::kSafeBrowsingExtendedReportingEnabled, APIPermission::kPrivacy, I thought you wanted ...
4 years, 2 months ago (2016-10-13 21:20:59 UTC) #14
lpz
https://codereview.chromium.org/2418813002/diff/20001/chrome/browser/extensions/api/preference/preference_api.cc File chrome/browser/extensions/api/preference/preference_api.cc (right): https://codereview.chromium.org/2418813002/diff/20001/chrome/browser/extensions/api/preference/preference_api.cc#newcode117 chrome/browser/extensions/api/preference/preference_api.cc:117: prefs::kSafeBrowsingExtendedReportingEnabled, APIPermission::kPrivacy, On 2016/10/13 21:20:59, lazyboy wrote: > I ...
4 years, 2 months ago (2016-10-13 22:27:34 UTC) #15
lazyboy
sgtm, c/b/extensions lgtm.
4 years, 2 months ago (2016-10-13 22:30:17 UTC) #16
lpz
+gab to review newly added DEP on components/prefs
4 years, 2 months ago (2016-10-17 17:34:16 UTC) #18
gab
On 2016/10/17 17:34:16, lpz wrote: > +gab to review newly added DEP on components/prefs Referring ...
4 years, 2 months ago (2016-10-17 19:27:12 UTC) #19
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/2418813002/40001
4 years, 2 months ago (2016-10-18 17:21:39 UTC) #26
commit-bot: I haz the power
Try jobs failed on following builders: chromium_presubmit on master.tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/chromium_presubmit/builds/283734)
4 years, 2 months ago (2016-10-18 17:27:23 UTC) #28
lpz
On 2016/10/17 19:27:12, gab wrote: > On 2016/10/17 17:34:16, lpz wrote: > > +gab to ...
4 years, 2 months ago (2016-10-18 17:33:14 UTC) #30
lpz
+dtrainor for c/b/android/preferences
4 years, 2 months ago (2016-10-18 17:33:47 UTC) #31
Miguel Garcia
lgtm for chrome/browser/android/preferences/pref_service_bridge.cc
4 years, 2 months ago (2016-10-20 15:23:16 UTC) #38
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/2418813002/60001
4 years, 2 months ago (2016-10-20 19:33:21 UTC) #47
commit-bot: I haz the power
Committed patchset #4 (id:60001)
4 years, 2 months ago (2016-10-20 19:43:02 UTC) #49
commit-bot: I haz the power
Patchset 4 (id:??) landed as https://crrev.com/cc1c0ce3a7ee43e7f4b87620899c0b7a41d2a9da Cr-Commit-Position: refs/heads/master@{#426565}
4 years, 2 months ago (2016-10-21 13:21:25 UTC) #51
David Trainor- moved to gerrit
4 years, 2 months ago (2016-10-21 16:18:41 UTC) #52
Message was sent while issue was closed.
lgtm.  sorry for the delay.

Powered by Google App Engine
This is Rietveld 408576698