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

Issue 8568019: Introduce per-tab preferences service. (Closed)

Created:
9 years, 1 month ago by mnaganov (inactive)
Modified:
9 years, 1 month ago
CC:
chromium-reviews, creis+watch_chromium.org, Paweł Hajdan Jr., jam, dpranke-watch+content_chromium.org, joi+watch-content_chromium.org, darin-cc_chromium.org, brettw-cc_chromium.org, ajwong+watch_chromium.org
Visibility:
Public.

Description

Introduce per-tab preferences service. This enables overriding user preferences on a per-tab rather than per-profile basis. Based on this CL: http://codereview.chromium.org/7838030/ BUG=none TEST=unit_tests pass Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=111128

Patch Set 1 #

Total comments: 20

Patch Set 2 : Comments addressed #

Total comments: 9

Patch Set 3 : Comments addressed #

Total comments: 5

Patch Set 4 : Single PrefService constructor #

Total comments: 10

Patch Set 5 : Comments addressed #

Patch Set 6 : Less changes to pref_service.h #

Patch Set 7 : Fixed ProfileSyncServicePreferenceTest tests #

Total comments: 4
Unified diffs Side-by-side diffs Delta from patch set Stats (+195 lines, -96 lines) Patch
M chrome/browser/prefs/incognito_user_pref_store.h View 1 2 chunks +1 line, -3 lines 0 comments Download
A chrome/browser/prefs/per_tab_user_pref_store.h View 1 1 chunk +20 lines, -0 lines 0 comments Download
A chrome/browser/prefs/per_tab_user_pref_store.cc View 1 1 chunk +9 lines, -0 lines 0 comments Download
M chrome/browser/prefs/pref_model_associator.h View 1 2 3 3 chunks +3 lines, -4 lines 0 comments Download
M chrome/browser/prefs/pref_model_associator.cc View 1 2 3 4 5 6 3 chunks +6 lines, -8 lines 0 comments Download
M chrome/browser/prefs/pref_notifier_impl.h View 1 2 3 2 chunks +3 lines, -0 lines 0 comments Download
M chrome/browser/prefs/pref_notifier_impl.cc View 1 2 3 2 chunks +9 lines, -0 lines 0 comments Download
M chrome/browser/prefs/pref_service.h View 1 2 3 4 5 4 chunks +11 lines, -16 lines 0 comments Download
M chrome/browser/prefs/pref_service.cc View 1 2 3 4 5 2 chunks +75 lines, -45 lines 0 comments Download
M chrome/browser/prefs/pref_service_mock_builder.cc View 1 2 3 4 5 2 chunks +21 lines, -9 lines 0 comments Download
M chrome/browser/ui/tab_contents/tab_contents_wrapper.h View 1 2 2 chunks +2 lines, -0 lines 2 comments Download
M chrome/browser/ui/tab_contents/tab_contents_wrapper.cc View 1 2 3 1 chunk +2 lines, -0 lines 2 comments Download
M chrome/chrome_browser.gypi View 1 2 3 4 1 chunk +2 lines, -0 lines 0 comments Download
M chrome/test/base/testing_pref_service.h View 1 2 3 4 5 6 2 chunks +7 lines, -1 line 0 comments Download
M chrome/test/base/testing_pref_service.cc View 1 2 3 4 5 6 3 chunks +24 lines, -10 lines 0 comments Download

Messages

Total messages: 24 (0 generated)
mnaganov (inactive)
Hi Mattias, In this CL I'm adding per-tab pref service to TabContents. I'm using your ...
9 years, 1 month ago (2011-11-15 20:28:02 UTC) #1
Avi (use Gerrit)
We almost certainly do not want to go this route. Please do not add new ...
9 years, 1 month ago (2011-11-15 20:31:32 UTC) #2
Avi (use Gerrit)
Note that the CL that you based this on does this correctly, and adds the ...
9 years, 1 month ago (2011-11-15 20:32:19 UTC) #3
Mattias Nissler (ping if slow)
http://codereview.chromium.org/8568019/diff/1/chrome/browser/prefs/per_tab_user_pref_store.cc File chrome/browser/prefs/per_tab_user_pref_store.cc (right): http://codereview.chromium.org/8568019/diff/1/chrome/browser/prefs/per_tab_user_pref_store.cc#newcode6 chrome/browser/prefs/per_tab_user_pref_store.cc:6: #include "chrome/common/pref_names.h" not needed. http://codereview.chromium.org/8568019/diff/1/chrome/browser/prefs/per_tab_user_pref_store.h File chrome/browser/prefs/per_tab_user_pref_store.h (right): http://codereview.chromium.org/8568019/diff/1/chrome/browser/prefs/per_tab_user_pref_store.h#newcode9 ...
9 years, 1 month ago (2011-11-16 12:08:04 UTC) #4
mnaganov (inactive)
Thanks Avi and Mattias! After addressing your comments the patch has become much cleaner. http://codereview.chromium.org/8568019/diff/1/chrome/browser/prefs/per_tab_user_pref_store.cc ...
9 years, 1 month ago (2011-11-17 16:50:58 UTC) #5
Avi (use Gerrit)
A much better approach. Move things around and you'll have my OK. http://codereview.chromium.org/8568019/diff/10001/chrome/browser/ui/tab_contents/tab_contents_wrapper.h File chrome/browser/ui/tab_contents/tab_contents_wrapper.h ...
9 years, 1 month ago (2011-11-17 18:23:33 UTC) #6
mnaganov (inactive)
http://codereview.chromium.org/8568019/diff/10001/chrome/browser/ui/tab_contents/tab_contents_wrapper.h File chrome/browser/ui/tab_contents/tab_contents_wrapper.h (right): http://codereview.chromium.org/8568019/diff/10001/chrome/browser/ui/tab_contents/tab_contents_wrapper.h#newcode297 chrome/browser/ui/tab_contents/tab_contents_wrapper.h:297: scoped_ptr<PrefService> per_tab_prefs_; On 2011/11/17 18:23:33, Avi wrote: > Since ...
9 years, 1 month ago (2011-11-17 18:27:00 UTC) #7
Avi (use Gerrit)
My question is: will people say: tab_contents_wrapper()->per_tab_prefs()->DoSomething()? If there will be an accessor on TCW ...
9 years, 1 month ago (2011-11-17 18:29:09 UTC) #8
mnaganov (inactive)
On 2011/11/17 18:29:09, Avi wrote: > My question is: will people say: > > tab_contents_wrapper()->per_tab_prefs()->DoSomething()? ...
9 years, 1 month ago (2011-11-17 18:33:15 UTC) #9
Mattias Nissler (ping if slow)
http://codereview.chromium.org/8568019/diff/10001/chrome/browser/prefs/pref_service.cc File chrome/browser/prefs/pref_service.cc (right): http://codereview.chromium.org/8568019/diff/10001/chrome/browser/prefs/pref_service.cc#newcode179 chrome/browser/prefs/pref_service.cc:179: default_store_.get()); You pass in the default store as the ...
9 years, 1 month ago (2011-11-17 18:44:39 UTC) #10
mnaganov (inactive)
http://codereview.chromium.org/8568019/diff/10001/chrome/browser/prefs/pref_service.cc File chrome/browser/prefs/pref_service.cc (right): http://codereview.chromium.org/8568019/diff/10001/chrome/browser/prefs/pref_service.cc#newcode179 chrome/browser/prefs/pref_service.cc:179: default_store_.get()); On 2011/11/17 18:44:39, Mattias Nissler wrote: > You ...
9 years, 1 month ago (2011-11-17 19:53:32 UTC) #11
mnaganov (inactive)
http://codereview.chromium.org/8568019/diff/10001/chrome/browser/ui/tab_contents/tab_contents_wrapper.h File chrome/browser/ui/tab_contents/tab_contents_wrapper.h (right): http://codereview.chromium.org/8568019/diff/10001/chrome/browser/ui/tab_contents/tab_contents_wrapper.h#newcode297 chrome/browser/ui/tab_contents/tab_contents_wrapper.h:297: scoped_ptr<PrefService> per_tab_prefs_; On 2011/11/17 18:27:00, Mikhail Naganov (Chromium) wrote: ...
9 years, 1 month ago (2011-11-17 19:54:43 UTC) #12
Mattias Nissler (ping if slow)
http://codereview.chromium.org/8568019/diff/11012/chrome/browser/prefs/pref_service.h File chrome/browser/prefs/pref_service.h (right): http://codereview.chromium.org/8568019/diff/11012/chrome/browser/prefs/pref_service.h#newcode325 chrome/browser/prefs/pref_service.h:325: DefaultPrefStore* default_store); Oh, I had totally missed that there's ...
9 years, 1 month ago (2011-11-17 20:08:13 UTC) #13
mnaganov (inactive)
http://codereview.chromium.org/8568019/diff/11012/chrome/browser/prefs/pref_service.h File chrome/browser/prefs/pref_service.h (right): http://codereview.chromium.org/8568019/diff/11012/chrome/browser/prefs/pref_service.h#newcode325 chrome/browser/prefs/pref_service.h:325: DefaultPrefStore* default_store); On 2011/11/17 20:08:13, Mattias Nissler wrote: > ...
9 years, 1 month ago (2011-11-18 11:20:45 UTC) #14
mnaganov (inactive)
http://codereview.chromium.org/8568019/diff/11012/chrome/browser/prefs/pref_service.h File chrome/browser/prefs/pref_service.h (right): http://codereview.chromium.org/8568019/diff/11012/chrome/browser/prefs/pref_service.h#newcode325 chrome/browser/prefs/pref_service.h:325: DefaultPrefStore* default_store); On 2011/11/18 11:20:45, Mikhail Naganov (Chromium) wrote: ...
9 years, 1 month ago (2011-11-18 11:24:48 UTC) #15
Mattias Nissler (ping if slow)
http://codereview.chromium.org/8568019/diff/11012/chrome/browser/prefs/pref_service.h File chrome/browser/prefs/pref_service.h (right): http://codereview.chromium.org/8568019/diff/11012/chrome/browser/prefs/pref_service.h#newcode325 chrome/browser/prefs/pref_service.h:325: DefaultPrefStore* default_store); On 2011/11/18 11:20:45, Mikhail Naganov (Chromium) wrote: ...
9 years, 1 month ago (2011-11-18 12:01:37 UTC) #16
mnaganov (inactive)
http://codereview.chromium.org/8568019/diff/11012/chrome/browser/prefs/pref_service.h File chrome/browser/prefs/pref_service.h (right): http://codereview.chromium.org/8568019/diff/11012/chrome/browser/prefs/pref_service.h#newcode325 chrome/browser/prefs/pref_service.h:325: DefaultPrefStore* default_store); On 2011/11/18 12:01:37, Mattias Nissler wrote: > ...
9 years, 1 month ago (2011-11-18 14:35:04 UTC) #17
Mattias Nissler (ping if slow)
http://codereview.chromium.org/8568019/diff/17001/chrome/browser/prefs/pref_service.h File chrome/browser/prefs/pref_service.h (right): http://codereview.chromium.org/8568019/diff/17001/chrome/browser/prefs/pref_service.h#newcode394 chrome/browser/prefs/pref_service.h:394: // and owned by this PrefService. Subclasses may access ...
9 years, 1 month ago (2011-11-18 14:57:07 UTC) #18
mnaganov (inactive)
http://codereview.chromium.org/8568019/diff/17001/chrome/browser/prefs/pref_service.h File chrome/browser/prefs/pref_service.h (right): http://codereview.chromium.org/8568019/diff/17001/chrome/browser/prefs/pref_service.h#newcode394 chrome/browser/prefs/pref_service.h:394: // and owned by this PrefService. Subclasses may access ...
9 years, 1 month ago (2011-11-21 14:52:20 UTC) #19
Mattias Nissler (ping if slow)
Prefs LGTM, please also get Avi's thumbs up for the TabContents-related changes. http://codereview.chromium.org/8568019/diff/17001/chrome/browser/prefs/pref_service_mock_builder.cc File chrome/browser/prefs/pref_service_mock_builder.cc ...
9 years, 1 month ago (2011-11-21 15:12:37 UTC) #20
mnaganov (inactive)
Avi, are you OK with this change? http://codereview.chromium.org/8568019/diff/17001/chrome/test/base/testing_pref_service.cc File chrome/test/base/testing_pref_service.cc (right): http://codereview.chromium.org/8568019/diff/17001/chrome/test/base/testing_pref_service.cc#newcode25 chrome/test/base/testing_pref_service.cc:25: new PrefModelAssociator(), ...
9 years, 1 month ago (2011-11-21 16:36:38 UTC) #21
Avi (use Gerrit)
I'm happy with the TCW changes (with the alphabetization as noted below). If you need ...
9 years, 1 month ago (2011-11-21 16:40:53 UTC) #22
mnaganov (inactive)
Thanks! http://codereview.chromium.org/8568019/diff/27002/chrome/browser/ui/tab_contents/tab_contents_wrapper.cc File chrome/browser/ui/tab_contents/tab_contents_wrapper.cc (right): http://codereview.chromium.org/8568019/diff/27002/chrome/browser/ui/tab_contents/tab_contents_wrapper.cc#newcode309 chrome/browser/ui/tab_contents/tab_contents_wrapper.cc:309: profile()->GetPrefs()->CreatePrefServiceWithPerTabPrefStore()); On 2011/11/21 16:40:54, Avi wrote: > Keep ...
9 years, 1 month ago (2011-11-21 17:02:10 UTC) #23
Peter Kasting
9 years, 1 month ago (2011-11-21 17:55:28 UTC) #24
Drive-by: This is a serious functional change, so please add a valid BUG= line,
and if manual testing is possible yet, a TEST= line as well.

Powered by Google App Engine
This is Rietveld 408576698