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

Issue 7344008: Make the hcsm and its providers communicate via an observer interface. (Closed)

Created:
9 years, 5 months ago by markusheintz_
Modified:
9 years, 5 months ago
Reviewers:
Bernhard Bauer
CC:
chromium-reviews, Aaron Boodman, Erik does not do reviews, jochen (gone - plz use gerrit)
Visibility:
Public.

Description

Add a content_settings::Observer and make providers notify the host content settings map via the observer interface about content settings changes. The host content settings map now the single source for sending out CONTENT_SETTINGS_CHANGED notification. BUG=TODO TEST=host_content_settings_map_unittest.cc, content_settings_policy_provider_unittest.cc, content_settings_pref_provider_unittest.cc, Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=92505

Patch Set 1 #

Patch Set 2 : " #

Patch Set 3 : " #

Patch Set 4 : " #

Total comments: 24

Patch Set 5 : " #

Patch Set 6 : "remove commented code" #

Total comments: 4

Patch Set 7 : "Rename AbstractProvider to ObservableProvider and remove the Observer param from all Provider cons" #

Total comments: 1

Patch Set 8 : " #

Unified diffs Side-by-side diffs Delta from patch set Stats (+255 lines, -155 lines) Patch
M chrome/browser/content_settings/content_settings_extension_provider.h View 1 2 3 4 5 6 3 chunks +6 lines, -13 lines 0 comments Download
M chrome/browser/content_settings/content_settings_extension_provider.cc View 1 2 3 4 5 6 3 chunks +6 lines, -23 lines 0 comments Download
A chrome/browser/content_settings/content_settings_mock_observer.h View 1 2 3 4 5 6 7 1 chunk +31 lines, -0 lines 0 comments Download
A chrome/browser/content_settings/content_settings_mock_observer.cc View 1 2 3 4 5 6 7 1 chunk +15 lines, -0 lines 0 comments Download
A chrome/browser/content_settings/content_settings_observable_provider.h View 1 2 3 4 5 6 1 chunk +38 lines, -0 lines 0 comments Download
A chrome/browser/content_settings/content_settings_observable_provider.cc View 1 2 3 4 5 6 1 chunk +41 lines, -0 lines 0 comments Download
A chrome/browser/content_settings/content_settings_observer.h View 1 2 3 4 5 6 7 1 chunk +26 lines, -0 lines 0 comments Download
M chrome/browser/content_settings/content_settings_policy_provider.h View 1 2 3 4 5 6 3 chunks +4 lines, -8 lines 0 comments Download
M chrome/browser/content_settings/content_settings_policy_provider.cc View 1 2 3 4 5 6 4 chunks +7 lines, -22 lines 0 comments Download
M chrome/browser/content_settings/content_settings_policy_provider_unittest.cc View 1 2 3 4 5 6 3 chunks +3 lines, -2 lines 0 comments Download
M chrome/browser/content_settings/content_settings_pref_provider.h View 1 2 3 4 5 6 3 chunks +3 lines, -9 lines 0 comments Download
M chrome/browser/content_settings/content_settings_pref_provider.cc View 1 2 3 4 5 6 6 chunks +12 lines, -29 lines 0 comments Download
M chrome/browser/content_settings/content_settings_pref_provider_unittest.cc View 1 2 3 4 5 6 6 chunks +18 lines, -33 lines 0 comments Download
M chrome/browser/content_settings/host_content_settings_map.h View 1 2 3 4 3 chunks +10 lines, -1 line 0 comments Download
M chrome/browser/content_settings/host_content_settings_map.cc View 1 2 3 4 5 6 4 chunks +30 lines, -15 lines 0 comments Download
M chrome/chrome_browser.gypi View 1 2 3 4 5 6 7 1 chunk +3 lines, -0 lines 0 comments Download
M chrome/chrome_tests.gypi View 1 2 3 4 5 6 7 1 chunk +2 lines, -0 lines 0 comments Download

Messages

Total messages: 8 (0 generated)
markusheintz_
Could you please already take a look at this CL before I start changing the ...
9 years, 5 months ago (2011-07-12 15:57:35 UTC) #1
Bernhard Bauer
http://codereview.chromium.org/7344008/diff/3026/chrome/browser/content_settings/content_settings_abstract_provider.cc File chrome/browser/content_settings/content_settings_abstract_provider.cc (right): http://codereview.chromium.org/7344008/diff/3026/chrome/browser/content_settings/content_settings_abstract_provider.cc#newcode14 chrome/browser/content_settings/content_settings_abstract_provider.cc:14: AbstractProvider::~AbstractProvider() { Can you add a |DCHECK(observers_.empty())|? http://codereview.chromium.org/7344008/diff/3026/chrome/browser/content_settings/content_settings_abstract_provider.h File ...
9 years, 5 months ago (2011-07-13 07:58:18 UTC) #2
markusheintz_
http://codereview.chromium.org/7344008/diff/3026/chrome/browser/content_settings/content_settings_abstract_provider.cc File chrome/browser/content_settings/content_settings_abstract_provider.cc (right): http://codereview.chromium.org/7344008/diff/3026/chrome/browser/content_settings/content_settings_abstract_provider.cc#newcode14 chrome/browser/content_settings/content_settings_abstract_provider.cc:14: AbstractProvider::~AbstractProvider() { On 2011/07/13 07:58:18, Bernhard Bauer wrote: > ...
9 years, 5 months ago (2011-07-13 12:48:16 UTC) #3
Bernhard Bauer
http://codereview.chromium.org/7344008/diff/3026/chrome/browser/content_settings/content_settings_abstract_provider.cc File chrome/browser/content_settings/content_settings_abstract_provider.cc (right): http://codereview.chromium.org/7344008/diff/3026/chrome/browser/content_settings/content_settings_abstract_provider.cc#newcode14 chrome/browser/content_settings/content_settings_abstract_provider.cc:14: AbstractProvider::~AbstractProvider() { On 2011/07/13 12:48:16, markusheintz_ wrote: > On ...
9 years, 5 months ago (2011-07-13 13:21:28 UTC) #4
markusheintz_
http://codereview.chromium.org/7344008/diff/7005/chrome/browser/content_settings/content_settings_policy_provider.h File chrome/browser/content_settings/content_settings_policy_provider.h (right): http://codereview.chromium.org/7344008/diff/7005/chrome/browser/content_settings/content_settings_policy_provider.h#newcode84 chrome/browser/content_settings/content_settings_policy_provider.h:84: PolicyProvider(Observer* observer, On 2011/07/13 13:21:28, Bernhard Bauer wrote: > ...
9 years, 5 months ago (2011-07-13 13:28:53 UTC) #5
Bernhard Bauer
http://codereview.chromium.org/7344008/diff/7005/chrome/browser/content_settings/content_settings_policy_provider.h File chrome/browser/content_settings/content_settings_policy_provider.h (right): http://codereview.chromium.org/7344008/diff/7005/chrome/browser/content_settings/content_settings_policy_provider.h#newcode84 chrome/browser/content_settings/content_settings_policy_provider.h:84: PolicyProvider(Observer* observer, On 2011/07/13 13:28:53, markusheintz_ wrote: > On ...
9 years, 5 months ago (2011-07-13 13:41:32 UTC) #6
markusheintz_
http://codereview.chromium.org/7344008/diff/3026/chrome/browser/content_settings/content_settings_abstract_provider.cc File chrome/browser/content_settings/content_settings_abstract_provider.cc (right): http://codereview.chromium.org/7344008/diff/3026/chrome/browser/content_settings/content_settings_abstract_provider.cc#newcode14 chrome/browser/content_settings/content_settings_abstract_provider.cc:14: AbstractProvider::~AbstractProvider() { On 2011/07/13 13:21:28, Bernhard Bauer wrote: > ...
9 years, 5 months ago (2011-07-13 14:14:42 UTC) #7
Bernhard Bauer
9 years, 5 months ago (2011-07-13 14:22:24 UTC) #8
LGTM with a nit:

http://codereview.chromium.org/7344008/diff/8006/chrome/browser/content_setti...
File chrome/browser/content_settings/content_settings_mock_observer.h (right):

http://codereview.chromium.org/7344008/diff/8006/chrome/browser/content_setti...
chrome/browser/content_settings/content_settings_mock_observer.h:15: class
MockObserver : public Observer {
This class is only used in one unit test, so you could just declare it there.

Powered by Google App Engine
This is Rietveld 408576698