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

Issue 7049007: Origin Identifier Value Map. (Closed)

Created:
9 years, 7 months ago by markusheintz_
Modified:
9 years, 6 months ago
CC:
chromium-reviews, Paweł Hajdan Jr.
Visibility:
Public.

Description

In memory map to store |Value| objects for (origin pattern, origin pattern, content type, resource) identifier) tuples. This is supposed to replace the content_settings::BaseProvider. BUG=63656 TEST=origin_identifier_value_map_unittest.cc, content_settings_pref_provider_unittest.cc, host_content_settings_map_unittest.cc Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=88522

Patch Set 1 #

Total comments: 33

Patch Set 2 : " #

Patch Set 3 : " #

Patch Set 4 : " #

Total comments: 26

Patch Set 5 : " #

Patch Set 6 : " #

Patch Set 7 : " #

Patch Set 8 : " #

Patch Set 9 : " #

Patch Set 10 : " #

Patch Set 11 : " #

Patch Set 12 : " #

Patch Set 13 : " #

Total comments: 18

Patch Set 14 : " #

Total comments: 4

Patch Set 15 : " #

Total comments: 21

Patch Set 16 : " #

Patch Set 17 : " #

Total comments: 1

Patch Set 18 : " #

Total comments: 3

Patch Set 19 : " #

Patch Set 20 : " #

Patch Set 21 : " #

Patch Set 22 : " #

Patch Set 23 : " #

Patch Set 24 : " #

Total comments: 9
Unified diffs Side-by-side diffs Delta from patch set Stats (+797 lines, -281 lines) Patch
A chrome/browser/content_settings/content_settings_origin_identifier_value_map.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 1 chunk +133 lines, -0 lines 5 comments Download
A chrome/browser/content_settings/content_settings_origin_identifier_value_map.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 1 chunk +131 lines, -0 lines 2 comments Download
A chrome/browser/content_settings/content_settings_origin_identifier_value_map_unittest.cc View 1 2 3 4 5 6 7 8 9 1 chunk +172 lines, -0 lines 0 comments Download
M chrome/browser/content_settings/content_settings_pattern.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 1 chunk +0 lines, -4 lines 0 comments Download
M chrome/browser/content_settings/content_settings_pattern.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 2 chunks +0 lines, -44 lines 0 comments Download
M chrome/browser/content_settings/content_settings_pref_provider.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 6 chunks +27 lines, -13 lines 0 comments Download
M chrome/browser/content_settings/content_settings_pref_provider.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 13 chunks +303 lines, -195 lines 0 comments Download
M chrome/browser/content_settings/host_content_settings_map.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 2 chunks +21 lines, -22 lines 0 comments Download
M chrome/browser/ui/content_settings/content_setting_bubble_model_unittest.cc View 1 2 3 4 1 chunk +4 lines, -0 lines 0 comments Download
M chrome/browser/ui/webui/options/content_settings_handler.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 3 chunks +3 lines, -3 lines 0 comments Download
M chrome/chrome_browser.gypi View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 1 chunk +2 lines, -0 lines 2 comments Download
M chrome/chrome_tests.gypi View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 1 chunk +1 line, -0 lines 0 comments Download

Messages

Total messages: 22 (0 generated)
markusheintz_
Pls take a first look but don't review yet. Thanks
9 years, 7 months ago (2011-05-19 13:57:04 UTC) #1
jochen (gone - plz use gerrit)
only a few nits from my side http://codereview.chromium.org/7049007/diff/1/chrome/browser/content_settings/content_settings_origin_identifier_value_map.cc File chrome/browser/content_settings/content_settings_origin_identifier_value_map.cc (right): http://codereview.chromium.org/7049007/diff/1/chrome/browser/content_settings/content_settings_origin_identifier_value_map.cc#newcode25 chrome/browser/content_settings/content_settings_origin_identifier_value_map.cc:25: if (first->a.Compare(second->a) ...
9 years, 7 months ago (2011-05-19 14:37:11 UTC) #2
Bernhard Bauer
http://codereview.chromium.org/7049007/diff/1/chrome/browser/content_settings/content_settings_origin_identifier_value_map.cc File chrome/browser/content_settings/content_settings_origin_identifier_value_map.cc (right): http://codereview.chromium.org/7049007/diff/1/chrome/browser/content_settings/content_settings_origin_identifier_value_map.cc#newcode12 chrome/browser/content_settings/content_settings_origin_identifier_value_map.cc:12: typedef content_settings::OriginIdentifierValueMap::EntryList::const_iterator The typedef doesn't need to be in ...
9 years, 7 months ago (2011-05-19 15:05:16 UTC) #3
markusheintz_
I will fix the TODOs and nits. http://codereview.chromium.org/7049007/diff/1/chrome/browser/content_settings/content_settings_origin_identifier_value_map.cc File chrome/browser/content_settings/content_settings_origin_identifier_value_map.cc (right): http://codereview.chromium.org/7049007/diff/1/chrome/browser/content_settings/content_settings_origin_identifier_value_map.cc#newcode12 chrome/browser/content_settings/content_settings_origin_identifier_value_map.cc:12: typedef content_settings::OriginIdentifierValueMap::EntryList::const_iterator ...
9 years, 7 months ago (2011-05-23 19:55:09 UTC) #4
Bernhard Bauer
http://codereview.chromium.org/7049007/diff/1/chrome/browser/content_settings/content_settings_origin_identifier_value_map.cc File chrome/browser/content_settings/content_settings_origin_identifier_value_map.cc (right): http://codereview.chromium.org/7049007/diff/1/chrome/browser/content_settings/content_settings_origin_identifier_value_map.cc#newcode25 chrome/browser/content_settings/content_settings_origin_identifier_value_map.cc:25: if (first->a.Compare(second->a) == ContentSettingsPattern::PREDECESSOR) On 2011/05/23 19:55:11, markusheintz_ wrote: ...
9 years, 7 months ago (2011-05-24 14:21:28 UTC) #5
markusheintz_
Here we go. CL ready for review. http://codereview.chromium.org/7049007/diff/1/chrome/browser/content_settings/content_settings_origin_identifier_value_map.cc File chrome/browser/content_settings/content_settings_origin_identifier_value_map.cc (right): http://codereview.chromium.org/7049007/diff/1/chrome/browser/content_settings/content_settings_origin_identifier_value_map.cc#newcode25 chrome/browser/content_settings/content_settings_origin_identifier_value_map.cc:25: if (first->a.Compare(second->a) ...
9 years, 7 months ago (2011-05-26 13:22:12 UTC) #6
Bernhard Bauer
http://codereview.chromium.org/7049007/diff/1/chrome/browser/content_settings/content_settings_origin_identifier_value_map.cc File chrome/browser/content_settings/content_settings_origin_identifier_value_map.cc (right): http://codereview.chromium.org/7049007/diff/1/chrome/browser/content_settings/content_settings_origin_identifier_value_map.cc#newcode25 chrome/browser/content_settings/content_settings_origin_identifier_value_map.cc:25: if (first->a.Compare(second->a) == ContentSettingsPattern::PREDECESSOR) On 2011/05/26 13:22:13, markusheintz_ wrote: ...
9 years, 7 months ago (2011-05-26 23:14:42 UTC) #7
markusheintz_
http://codereview.chromium.org/7049007/diff/1/chrome/browser/content_settings/content_settings_origin_identifier_value_map.cc File chrome/browser/content_settings/content_settings_origin_identifier_value_map.cc (right): http://codereview.chromium.org/7049007/diff/1/chrome/browser/content_settings/content_settings_origin_identifier_value_map.cc#newcode25 chrome/browser/content_settings/content_settings_origin_identifier_value_map.cc:25: if (first->a.Compare(second->a) == ContentSettingsPattern::PREDECESSOR) On 2011/05/26 23:14:42, Bernhard Bauer ...
9 years, 6 months ago (2011-05-31 11:46:41 UTC) #8
Bernhard Bauer
http://codereview.chromium.org/7049007/diff/5004/chrome/browser/content_settings/content_settings_pref_provider.cc File chrome/browser/content_settings/content_settings_pref_provider.cc (right): http://codereview.chromium.org/7049007/diff/5004/chrome/browser/content_settings/content_settings_pref_provider.cc#newcode115 chrome/browser/content_settings/content_settings_pref_provider.cc:115: // TODO(markusheintz): There should be an UNKNOWN ENUM item ...
9 years, 6 months ago (2011-05-31 14:55:11 UTC) #9
markusheintz_
I'll break this CL into 3 smaller CLs. But maybe you could have a quick ...
9 years, 6 months ago (2011-06-01 20:08:22 UTC) #10
Bernhard Bauer
http://codereview.chromium.org/7049007/diff/35001/chrome/browser/content_settings/content_settings_pattern.cc File chrome/browser/content_settings/content_settings_pattern.cc (right): http://codereview.chromium.org/7049007/diff/35001/chrome/browser/content_settings/content_settings_pattern.cc#newcode48 chrome/browser/content_settings/content_settings_pattern.cc:48: int CompareDomainNames(const std::string& str1, const std::string& str2) { How ...
9 years, 6 months ago (2011-06-01 20:18:25 UTC) #11
markusheintz_
How about handling the ordering in a separate CL. I need it anyway for the ...
9 years, 6 months ago (2011-06-01 20:55:26 UTC) #12
Bernhard Bauer
http://codereview.chromium.org/7049007/diff/35001/chrome/browser/content_settings/content_settings_pattern.cc File chrome/browser/content_settings/content_settings_pattern.cc (right): http://codereview.chromium.org/7049007/diff/35001/chrome/browser/content_settings/content_settings_pattern.cc#newcode48 chrome/browser/content_settings/content_settings_pattern.cc:48: int CompareDomainNames(const std::string& str1, const std::string& str2) { On ...
9 years, 6 months ago (2011-06-02 00:03:31 UTC) #13
markusheintz_
This CL is now independent of the changes to the ContentSettingsPattern::Compare method. http://codereview.chromium.org/7049007/diff/35001/chrome/browser/content_settings/content_settings_pattern.cc File chrome/browser/content_settings/content_settings_pattern.cc ...
9 years, 6 months ago (2011-06-03 13:08:53 UTC) #14
Bernhard Bauer
LGTM. http://codereview.chromium.org/7049007/diff/48001/chrome/browser/content_settings/host_content_settings_map.cc File chrome/browser/content_settings/host_content_settings_map.cc (right): http://codereview.chromium.org/7049007/diff/48001/chrome/browser/content_settings/host_content_settings_map.cc#newcode285 chrome/browser/content_settings/host_content_settings_map.cc:285: for (std::map<std::string, PatternSettingPair>::iterator i(tmp_map.begin()); Longer-term it might make ...
9 years, 6 months ago (2011-06-03 14:50:23 UTC) #15
markusheintz_
THX http://codereview.chromium.org/7049007/diff/48001/chrome/browser/content_settings/host_content_settings_map.cc File chrome/browser/content_settings/host_content_settings_map.cc (right): http://codereview.chromium.org/7049007/diff/48001/chrome/browser/content_settings/host_content_settings_map.cc#newcode285 chrome/browser/content_settings/host_content_settings_map.cc:285: for (std::map<std::string, PatternSettingPair>::iterator i(tmp_map.begin()); On 2011/06/03 14:50:23, Bernhard ...
9 years, 6 months ago (2011-06-03 15:29:31 UTC) #16
Bernhard Bauer
http://codereview.chromium.org/7049007/diff/48001/chrome/browser/content_settings/host_content_settings_map.cc File chrome/browser/content_settings/host_content_settings_map.cc (right): http://codereview.chromium.org/7049007/diff/48001/chrome/browser/content_settings/host_content_settings_map.cc#newcode285 chrome/browser/content_settings/host_content_settings_map.cc:285: for (std::map<std::string, PatternSettingPair>::iterator i(tmp_map.begin()); On 2011/06/03 15:29:31, markusheintz_ wrote: ...
9 years, 6 months ago (2011-06-03 16:36:54 UTC) #17
markusheintz_
Hey Bernhard maybe you want to take a look at the last to uploads and ...
9 years, 6 months ago (2011-06-08 15:30:50 UTC) #18
Bernhard Bauer
LGTM still holds.
9 years, 6 months ago (2011-06-08 15:50:15 UTC) #19
Bernhard Bauer
Whoops, seems I missed a couple of things. http://codereview.chromium.org/7049007/diff/50005/chrome/browser/content_settings/content_settings_origin_identifier_value_map.cc File chrome/browser/content_settings/content_settings_origin_identifier_value_map.cc (right): http://codereview.chromium.org/7049007/diff/50005/chrome/browser/content_settings/content_settings_origin_identifier_value_map.cc#newcode16 chrome/browser/content_settings/content_settings_origin_identifier_value_map.cc:16: Clear(); ...
9 years, 6 months ago (2011-06-14 11:50:57 UTC) #20
markusheintz_
Created CL: http://codereview.chromium.org/7149017 to fix these issues. http://codereview.chromium.org/7049007/diff/50005/chrome/browser/content_settings/content_settings_origin_identifier_value_map.cc File chrome/browser/content_settings/content_settings_origin_identifier_value_map.cc (right): http://codereview.chromium.org/7049007/diff/50005/chrome/browser/content_settings/content_settings_origin_identifier_value_map.cc#newcode16 chrome/browser/content_settings/content_settings_origin_identifier_value_map.cc:16: Clear(); On ...
9 years, 6 months ago (2011-06-14 12:24:33 UTC) #21
Bernhard Bauer
9 years, 6 months ago (2011-06-14 12:34:27 UTC) #22
On 2011/06/14 12:24:33, markusheintz_ wrote:
> Created CL:
> 
> http://codereview.chromium.org/7149017
> 
> to fix these issues.

Thanks!

http://codereview.chromium.org/7049007/diff/50005/chrome/browser/content_sett...
File
chrome/browser/content_settings/content_settings_origin_identifier_value_map.h
(right):

http://codereview.chromium.org/7049007/diff/50005/chrome/browser/content_sett...
chrome/browser/content_settings/content_settings_origin_identifier_value_map.h:107:
void Clear();
On 2011/06/14 12:24:33, markusheintz_ wrote:
> On 2011/06/14 11:50:57, Bernhard Bauer wrote:
> > This should be unnecessary now.
> 
> I think that's still necessary. I use it in the PolicyProvider.

Oh, right. You could rename it to lowercase to make it more analog to
|begin|/|end|/|size|/etc., but it's up to you.

Powered by Google App Engine
This is Rietveld 408576698