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

Issue 10049005: Fix homepage migration for users who never changed their settings. (Closed)

Created:
8 years, 8 months ago by Tyler Breisacher (Chromium)
Modified:
8 years, 8 months ago
CC:
chromium-reviews
Visibility:
Public.

Description

Fix homepage migration for users who never changed their settings. BUG=122936 TEST=Upgrade from 18 to 19 TBR=ben@chromium.org Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=133740

Patch Set 1 #

Patch Set 2 : if old setting is HOMEPAGE, always migrate #

Patch Set 3 : unit test #

Patch Set 4 : fix for m19 users changing their homepage #

Patch Set 5 : test for patch set 4 #

Patch Set 6 : test migration from blank #

Total comments: 3

Patch Set 7 : simpler approach (+ rebase) #

Total comments: 8

Patch Set 8 : fixes #

Total comments: 6

Patch Set 9 : mnissler recommended changes #

Patch Set 10 : Value -> base::Value #

Total comments: 1
Unified diffs Side-by-side diffs Delta from patch set Stats (+234 lines, -27 lines) Patch
M chrome/browser/prefs/pref_service.h View 1 2 3 4 5 6 7 8 1 chunk +4 lines, -0 lines 0 comments Download
M chrome/browser/prefs/pref_service.cc View 1 2 3 4 5 6 7 8 9 1 chunk +25 lines, -0 lines 0 comments Download
M chrome/browser/prefs/session_startup_pref.h View 1 2 3 4 5 6 7 8 9 1 chunk +5 lines, -0 lines 0 comments Download
M chrome/browser/prefs/session_startup_pref.cc View 1 2 3 4 5 6 7 8 9 4 chunks +55 lines, -14 lines 0 comments Download
M chrome/browser/prefs/session_startup_pref_unittest.cc View 1 2 3 4 5 6 3 chunks +59 lines, -0 lines 1 comment Download
M chrome/browser/protector/protected_prefs_watcher.cc View 1 2 3 4 5 6 7 1 chunk +1 line, -2 lines 0 comments Download
M chrome/browser/ui/browser_init.cc View 1 2 3 4 5 6 7 8 9 1 chunk +3 lines, -4 lines 0 comments Download
M chrome/common/pref_names.h View 1 2 3 4 5 6 7 8 9 1 chunk +1 line, -0 lines 0 comments Download
M chrome/common/pref_names.cc View 1 2 3 4 5 6 7 8 9 1 chunk +8 lines, -1 line 0 comments Download
M chrome/test/functional/protector.py View 1 2 3 4 5 6 7 8 9 4 chunks +73 lines, -6 lines 0 comments Download

Messages

Total messages: 23 (0 generated)
Tyler Breisacher (Chromium)
Follow-up to my favorite CL ever :)
8 years, 8 months ago (2012-04-11 22:18:23 UTC) #1
Ivan Korotkov
Can you please ensure that tests/functional/protector.py:testSessionStartupPrefMigration passes and (ideally) add a similar test case for ...
8 years, 8 months ago (2012-04-12 19:44:45 UTC) #2
Tyler Breisacher (Chromium)
In case anyone had already started looking at it, the previous patch didn't *quite* work ...
8 years, 8 months ago (2012-04-12 23:07:16 UTC) #3
Tyler Breisacher (Chromium)
I added a test for the case I just described, but I'm not sure how ...
8 years, 8 months ago (2012-04-13 00:03:54 UTC) #4
Ivan Korotkov
Why not modify Preferences directly outside of Chrome in between browser starts, like testSessionStartupPrefMigrationFromHomepage does ...
8 years, 8 months ago (2012-04-13 08:18:28 UTC) #5
Tyler Breisacher (Chromium)
On 2012/04/13 08:18:28, Ivan Korotkov wrote: > Why not modify Preferences directly outside of Chrome ...
8 years, 8 months ago (2012-04-13 18:03:11 UTC) #6
Tyler Breisacher (Chromium)
+nirnimesh for new functional tests +mnissler for chrome/browser/prefs OWNER review
8 years, 8 months ago (2012-04-13 21:57:43 UTC) #7
Tyler Breisacher (Chromium)
Oops, +mnissler for reals now.
8 years, 8 months ago (2012-04-13 21:58:28 UTC) #8
csilv
lgtm
8 years, 8 months ago (2012-04-13 22:19:03 UTC) #9
Nirnimesh
chrome/test/functional LGTM http://codereview.chromium.org/10049005/diff/16001/chrome/test/functional/protector.py File chrome/test/functional/protector.py (right): http://codereview.chromium.org/10049005/diff/16001/chrome/test/functional/protector.py#newcode497 chrome/test/functional/protector.py:497: self.GetPrefsInfo().Prefs(pyauto.kURLsToRestoreOnStartup)) use assertFalse instead
8 years, 8 months ago (2012-04-14 08:09:54 UTC) #10
Mattias Nissler (ping if slow)
http://codereview.chromium.org/10049005/diff/16001/chrome/browser/prefs/session_startup_pref.cc File chrome/browser/prefs/session_startup_pref.cc (right): http://codereview.chromium.org/10049005/diff/16001/chrome/browser/prefs/session_startup_pref.cc#newcode148 chrome/browser/prefs/session_startup_pref.cc:148: !prefs->GetBoolean(prefs::kHomePageIsNewTabPage))) { This is likely to break in case ...
8 years, 8 months ago (2012-04-16 09:21:46 UTC) #11
Tyler Breisacher (Chromium)
On 2012/04/16 09:21:46, Mattias Nissler wrote: > http://codereview.chromium.org/10049005/diff/16001/chrome/browser/prefs/session_startup_pref.cc > File chrome/browser/prefs/session_startup_pref.cc (right): > > http://codereview.chromium.org/10049005/diff/16001/chrome/browser/prefs/session_startup_pref.cc#newcode148 ...
8 years, 8 months ago (2012-04-16 16:38:17 UTC) #12
Tyler Breisacher (Chromium)
On 2012/04/16 09:21:46, Mattias Nissler wrote: > http://codereview.chromium.org/10049005/diff/16001/chrome/browser/prefs/session_startup_pref.cc > File chrome/browser/prefs/session_startup_pref.cc (right): > > http://codereview.chromium.org/10049005/diff/16001/chrome/browser/prefs/session_startup_pref.cc#newcode148 ...
8 years, 8 months ago (2012-04-16 16:38:18 UTC) #13
Mattias Nissler (ping if slow)
On Mon, Apr 16, 2012 at 6:38 PM, <tbreisacher@chromium.org> wrote: > On 2012/04/16 09:21:46, Mattias ...
8 years, 8 months ago (2012-04-16 17:00:41 UTC) #14
Tyler Breisacher (Chromium)
I added a new pref, session.restore_on_startup_migrated, as I suggested. I haven't made any changes to ...
8 years, 8 months ago (2012-04-16 21:43:40 UTC) #15
Ivan Korotkov
LGTM from protector side https://chromiumcodereview.appspot.com/10049005/diff/27001/chrome/browser/prefs/session_startup_pref.cc File chrome/browser/prefs/session_startup_pref.cc (right): https://chromiumcodereview.appspot.com/10049005/diff/27001/chrome/browser/prefs/session_startup_pref.cc#newcode138 chrome/browser/prefs/session_startup_pref.cc:138: if (!prefs->GetBoolean(prefs::kRestoreOnStartupMigrated)) { Could you ...
8 years, 8 months ago (2012-04-17 09:27:51 UTC) #16
Mattias Nissler (ping if slow)
https://chromiumcodereview.appspot.com/10049005/diff/27001/chrome/browser/prefs/session_startup_pref.cc File chrome/browser/prefs/session_startup_pref.cc (right): https://chromiumcodereview.appspot.com/10049005/diff/27001/chrome/browser/prefs/session_startup_pref.cc#newcode147 chrome/browser/prefs/session_startup_pref.cc:147: if (prefs->GetBoolean(prefs::kHomePageIsNewTabPage)) { These values may still come from ...
8 years, 8 months ago (2012-04-17 09:54:48 UTC) #17
Tyler Breisacher (Chromium)
https://chromiumcodereview.appspot.com/10049005/diff/27001/chrome/browser/prefs/session_startup_pref.cc File chrome/browser/prefs/session_startup_pref.cc (right): https://chromiumcodereview.appspot.com/10049005/diff/27001/chrome/browser/prefs/session_startup_pref.cc#newcode138 chrome/browser/prefs/session_startup_pref.cc:138: if (!prefs->GetBoolean(prefs::kRestoreOnStartupMigrated)) { On 2012/04/17 09:27:51, Ivan Korotkov wrote: ...
8 years, 8 months ago (2012-04-17 19:54:33 UTC) #18
Mattias Nissler (ping if slow)
Sorry to keep bashing on this. Let's take a step back and see what the ...
8 years, 8 months ago (2012-04-18 11:40:54 UTC) #19
Tyler Breisacher (Chromium)
On 2012/04/18 11:40:54, Mattias Nissler wrote: > Sorry to keep bashing on this. Not at ...
8 years, 8 months ago (2012-04-18 18:26:03 UTC) #20
Mattias Nissler (ping if slow)
Thanks for bearing with me, LGTM! https://chromiumcodereview.appspot.com/10049005/diff/34001/chrome/browser/prefs/session_startup_pref.cc File chrome/browser/prefs/session_startup_pref.cc (right): https://chromiumcodereview.appspot.com/10049005/diff/34001/chrome/browser/prefs/session_startup_pref.cc#newcode147 chrome/browser/prefs/session_startup_pref.cc:147: // URLS was ...
8 years, 8 months ago (2012-04-19 13:23:17 UTC) #21
Tyler Breisacher (Chromium)
This is now rebased on top of the CL that changes the way we handle ...
8 years, 8 months ago (2012-04-24 00:21:17 UTC) #22
Mattias Nissler (ping if slow)
8 years, 8 months ago (2012-04-24 07:23:59 UTC) #23
LGTM

http://codereview.chromium.org/10049005/diff/43001/chrome/browser/prefs/sessi...
File chrome/browser/prefs/session_startup_pref_unittest.cc (right):

http://codereview.chromium.org/10049005/diff/43001/chrome/browser/prefs/sessi...
chrome/browser/prefs/session_startup_pref_unittest.cc:63: // their preferences
are migrated on upgrade to m19.
nit: M19 (also below)

Powered by Google App Engine
This is Rietveld 408576698