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

Issue 12315116: Add ability to change default pref values, and use in BrowserInstantController. (Closed)

Created:
7 years, 10 months ago by Jói
Modified:
7 years, 9 months ago
CC:
chromium-reviews, melevin, sreeram, sail+watch_chromium.org, gideonwald, dominich, Aaron Boodman, David Black, samarth+watch_chromium.org, chromium-apps-reviews_chromium.org, markusheintz_, erikwright+watch_chromium.org, Jered
Visibility:
Public.

Description

Fix prefs registration in BrowserInstantController. Registration should happen prior to PrefService construction, so accepting a PrefService parameter to RegisterUserPrefs is a no-no. To keep the existing semantics, this change adds a PrefService::SetDefaultPrefValue method that allows you to change the default value for a pref. As BrowserInstantController was the last method called from chrome::RegisterUserPrefs that required a PrefService pointer, this also removes the PrefService parameter from the latter function and updates callers. TBR=ben@chromium.org BUG=155525 Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=185712

Patch Set 1 #

Total comments: 6

Patch Set 2 : Address review comments. Add a bit of documentation. #

Total comments: 1

Patch Set 3 : Merge LKGR and address review nit. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+81 lines, -36 lines) Patch
M base/prefs/pref_registry.h View 1 1 chunk +5 lines, -0 lines 0 comments Download
M base/prefs/pref_registry.cc View 1 1 chunk +15 lines, -0 lines 0 comments Download
M base/prefs/pref_service.h View 1 2 1 chunk +6 lines, -0 lines 0 comments Download
M base/prefs/pref_service.cc View 1 1 chunk +6 lines, -0 lines 0 comments Download
M chrome/browser/content_settings/content_settings_pref_provider_unittest.cc View 1 chunk +2 lines, -2 lines 0 comments Download
M chrome/browser/extensions/extension_service_unittest.cc View 1 2 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/policy/user_policy_signin_service_unittest.cc View 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/prefs/browser_prefs.h View 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/prefs/browser_prefs.cc View 1 2 1 chunk +2 lines, -6 lines 0 comments Download
M chrome/browser/prefs/proxy_policy_unittest.cc View 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/profiles/profile_impl.cc View 2 chunks +2 lines, -4 lines 0 comments Download
M chrome/browser/ui/browser_instant_controller.h View 1 1 chunk +1 line, -2 lines 0 comments Download
M chrome/browser/ui/browser_instant_controller.cc View 1 2 2 chunks +37 lines, -17 lines 0 comments Download
M chrome/test/base/testing_profile.cc View 1 chunk +1 line, -1 line 0 comments Download

Messages

Total messages: 15 (0 generated)
Jói
Mattias, Let me know what you think. An alternative would be to leave the public ...
7 years, 10 months ago (2013-02-26 22:11:49 UTC) #1
Mattias Nissler (ping if slow)
https://codereview.chromium.org/12315116/diff/1/base/prefs/pref_registry.h File base/prefs/pref_registry.h (right): https://codereview.chromium.org/12315116/diff/1/base/prefs/pref_registry.h#newcode36 base/prefs/pref_registry.h:36: scoped_refptr<DefaultPrefStore> defaults(); I think we should rather not expose ...
7 years, 10 months ago (2013-02-27 10:50:52 UTC) #2
Jói
> I think we should rather not expose the DefaultPrefStore type here, but > just ...
7 years, 10 months ago (2013-02-27 11:06:59 UTC) #3
Mattias Nissler (ping if slow)
On Wed, Feb 27, 2013 at 12:06 PM, Jói Sigurðsson <joi@chromium.org> wrote: > > I ...
7 years, 9 months ago (2013-02-27 12:30:29 UTC) #4
Jói
Addressed review comments, and added a bit of documentation on kInstantEnabled vs. kInstantExtendedEnabled in BrowserInstantController. ...
7 years, 9 months ago (2013-02-27 16:30:56 UTC) #5
sreeram
browser_instant_controller.* lgtm
7 years, 9 months ago (2013-02-27 16:35:27 UTC) #6
Jói
mnissler: Gentle ping.
7 years, 9 months ago (2013-02-28 14:46:40 UTC) #7
Mattias Nissler (ping if slow)
LGTM with a nit. Sorry for the delay, my Inbox grew faster the last 24 ...
7 years, 9 months ago (2013-02-28 15:46:25 UTC) #8
Jói
Thanks Mattias, and no worries on the delay - it was just I thought this ...
7 years, 9 months ago (2013-02-28 16:14:11 UTC) #9
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/joi@chromium.org/12315116/17001
7 years, 9 months ago (2013-03-01 12:45:46 UTC) #10
commit-bot: I haz the power
Presubmit check for 12315116-17001 failed and returned exit status 1. INFO:root:Found 14 file(s). Running presubmit ...
7 years, 9 months ago (2013-03-01 12:45:52 UTC) #11
Jói
TBR=ben@chromium.org for trivial usage updates of changed Prefs API. Cheers, Jói
7 years, 9 months ago (2013-03-01 12:47:32 UTC) #12
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/joi@chromium.org/12315116/17001
7 years, 9 months ago (2013-03-01 12:47:48 UTC) #13
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/joi@chromium.org/12315116/17001
7 years, 9 months ago (2013-03-02 16:07:52 UTC) #14
commit-bot: I haz the power
7 years, 9 months ago (2013-03-02 17:02:27 UTC) #15
Message was sent while issue was closed.
Change committed as 185712

Powered by Google App Engine
This is Rietveld 408576698