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

Issue 8539004: Replace SetContentSetting method of the content_settings::Provider interface with GetWebsiteSetting (Closed)

Created:
9 years, 1 month ago by markusheintz_
Modified:
9 years, 1 month ago
Reviewers:
Bernhard Bauer
CC:
chromium-reviews, Avi (use Gerrit), creis+watch_chromium.org, Erik does not do reviews, Paweł Hajdan Jr., mihaip+watch_chromium.org, Aaron Boodman, darin-cc_chromium.org, brettw-cc_chromium.org, ajwong+watch_chromium.org
Visibility:
Public.

Description

Replace SetContentSetting method of the content_settings::Provider interface with GetWebsiteSetting. This is part of a series of cleanup CLs to make all content settings Providers and the HostContentSetting map use only |Values| instead of |ContentSettings|. The HostContentSettingsMap should only contain conveniences methods that take |ContentSetting| parameters. BUG=102637 TEST=HostContentSettingsMapTest*, PrefProviderTest*, PolicyProviderTest*, DefaultProviderTest*, ExtensionProviderTest* Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=110500

Patch Set 1 #

Patch Set 2 : " #

Total comments: 48

Patch Set 3 : Addressed comments #

Patch Set 4 : " #

Patch Set 5 : " #

Total comments: 14

Patch Set 6 : Comments addressed #

Total comments: 2

Patch Set 7 : Fix two memory leaks in the DefaultProviderTests. #

Patch Set 8 : Rebase onto origin/trunk #

Unified diffs Side-by-side diffs Delta from patch set Stats (+336 lines, -211 lines) Patch
M chrome/browser/content_settings/content_settings_default_provider.h View 1 2 3 4 5 6 7 4 chunks +8 lines, -5 lines 0 comments Download
M chrome/browser/content_settings/content_settings_default_provider.cc View 1 2 3 4 5 6 7 6 chunks +86 lines, -60 lines 0 comments Download
M chrome/browser/content_settings/content_settings_default_provider_unittest.cc View 1 2 3 4 5 6 7 chunks +54 lines, -40 lines 0 comments Download
M chrome/browser/content_settings/content_settings_extension_provider.h View 1 2 1 chunk +4 lines, -4 lines 0 comments Download
M chrome/browser/content_settings/content_settings_extension_provider.cc View 1 2 1 chunk +9 lines, -0 lines 0 comments Download
M chrome/browser/content_settings/content_settings_mock_provider.h View 1 2 1 chunk +2 lines, -2 lines 0 comments Download
M chrome/browser/content_settings/content_settings_mock_provider.cc View 1 2 1 chunk +5 lines, -4 lines 0 comments Download
M chrome/browser/content_settings/content_settings_policy_provider.h View 1 2 1 chunk +2 lines, -2 lines 0 comments Download
M chrome/browser/content_settings/content_settings_policy_provider.cc View 1 2 1 chunk +3 lines, -2 lines 0 comments Download
M chrome/browser/content_settings/content_settings_policy_provider_unittest.cc View 1 2 1 chunk +6 lines, -3 lines 0 comments Download
M chrome/browser/content_settings/content_settings_pref_provider.h View 1 2 3 chunks +4 lines, -4 lines 0 comments Download
M chrome/browser/content_settings/content_settings_pref_provider.cc View 1 2 3 4 5 18 chunks +53 lines, -33 lines 0 comments Download
M chrome/browser/content_settings/content_settings_pref_provider_unittest.cc View 1 2 3 4 5 6 7 11 chunks +25 lines, -23 lines 0 comments Download
M chrome/browser/content_settings/content_settings_provider.h View 1 2 3 4 5 1 chunk +7 lines, -6 lines 0 comments Download
M chrome/browser/content_settings/content_settings_provider_unittest.cc View 1 2 3 4 2 chunks +11 lines, -6 lines 0 comments Download
M chrome/browser/content_settings/host_content_settings_map.h View 1 2 3 4 5 6 7 3 chunks +20 lines, -5 lines 0 comments Download
M chrome/browser/content_settings/host_content_settings_map.cc View 1 2 3 4 5 6 7 2 chunks +37 lines, -12 lines 0 comments Download

Messages

Total messages: 14 (0 generated)
markusheintz_
Please review this CL. Thanks.
9 years, 1 month ago (2011-11-11 12:22:42 UTC) #1
Bernhard Bauer
I have a bunch of comments, the one in host_content_settings_map.cc:262 is the most important one, ...
9 years, 1 month ago (2011-11-11 14:00:40 UTC) #2
markusheintz_
http://codereview.chromium.org/8539004/diff/2001/chrome/browser/content_settings/content_settings_default_provider.cc File chrome/browser/content_settings/content_settings_default_provider.cc (right): http://codereview.chromium.org/8539004/diff/2001/chrome/browser/content_settings/content_settings_default_provider.cc#newcode73 chrome/browser/content_settings/content_settings_default_provider.cc:73: // TODO(markusheintz): |ContentSetting| should be replace with a |Value|. ...
9 years, 1 month ago (2011-11-14 11:15:10 UTC) #3
Bernhard Bauer
http://codereview.chromium.org/8539004/diff/10018/chrome/browser/content_settings/content_settings_default_provider.cc File chrome/browser/content_settings/content_settings_default_provider.cc (right): http://codereview.chromium.org/8539004/diff/10018/chrome/browser/content_settings/content_settings_default_provider.cc#newcode191 chrome/browser/content_settings/content_settings_default_provider.cc:191: prefs_->Set(prefs::kGeolocationDefaultContentSetting, *value); I'm not happy that we pass ownership ...
9 years, 1 month ago (2011-11-15 15:40:28 UTC) #4
markusheintz_
Thanks for the great catches! http://codereview.chromium.org/8539004/diff/10018/chrome/browser/content_settings/content_settings_default_provider.cc File chrome/browser/content_settings/content_settings_default_provider.cc (right): http://codereview.chromium.org/8539004/diff/10018/chrome/browser/content_settings/content_settings_default_provider.cc#newcode191 chrome/browser/content_settings/content_settings_default_provider.cc:191: prefs_->Set(prefs::kGeolocationDefaultContentSetting, *value); On 2011/11/15 ...
9 years, 1 month ago (2011-11-15 17:36:58 UTC) #5
Bernhard Bauer
LGTM. Can you run this through valgrind to make sure we're not missing any more ...
9 years, 1 month ago (2011-11-15 17:45:53 UTC) #6
markusheintz_
I ran valgrind and fixed two memory leaks in the DefaultProvider unit_tests. I guess we ...
9 years, 1 month ago (2011-11-16 14:57:47 UTC) #7
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/markusheintz@chromium.org/8539004/33
9 years, 1 month ago (2011-11-16 15:32:19 UTC) #8
commit-bot: I haz the power
Can't apply patch for file chrome/browser/content_settings/content_settings_default_provider.cc. While running patch -p1 --forward --force; patching file chrome/browser/content_settings/content_settings_default_provider.cc ...
9 years, 1 month ago (2011-11-16 15:32:22 UTC) #9
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/markusheintz@chromium.org/8539004/33
9 years, 1 month ago (2011-11-17 12:04:24 UTC) #10
commit-bot: I haz the power
Can't apply patch for file chrome/browser/content_settings/content_settings_default_provider.cc. While running patch -p1 --forward --force; patching file chrome/browser/content_settings/content_settings_default_provider.cc ...
9 years, 1 month ago (2011-11-17 12:04:29 UTC) #11
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/markusheintz@chromium.org/8539004/28002
9 years, 1 month ago (2011-11-17 13:28:29 UTC) #12
commit-bot: I haz the power
Change committed as 110500
9 years, 1 month ago (2011-11-17 16:13:16 UTC) #13
James Hawkins
9 years, 1 month ago (2011-11-17 22:06:50 UTC) #14
This commit introduced a leak; fix is here:

http://codereview.chromium.org/8592001/

Powered by Google App Engine
This is Rietveld 408576698