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

Issue 1302303002: Remove year+ old migration support of "session.urls_to_restore_on_startup". (Closed)

Created:
5 years, 4 months ago by sdefresne
Modified:
5 years ago
CC:
asvitkine+watch_chromium.org, Andrew T Wilson (Slow), chromium-reviews, grt+watch_chromium.org, MAD, robertshield, wfh+watch_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@pref_service_syncable_unittest
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Remove year+ old migration support of "session.urls_to_restore_on_startup". Remove code supporting the migration of "session.urls_to_restore_on_startup" to "session.startup_urls", the corresponding constants, histograms and unit tests. This migration was there to support pre M-32 profiles. This is a preparatory step before componentization of //chrome/browser/prefs as keeping the migration code in the component is not worth the complexity. Mark histograms as obsolete as of 2015/12 due to the removal of the migration code they were mesuring. BUG=525079 Committed: https://crrev.com/39dc3a1ffc119ce551abb056057c7076b8017401 Cr-Commit-Position: refs/heads/master@{#362981}

Patch Set 1 #

Total comments: 14

Patch Set 2 : Address (some) comments by gab #

Patch Set 3 : Remove migration support code #

Total comments: 1

Patch Set 4 : Remove old include of "base/gtest_prod_util.h" #

Total comments: 2

Patch Set 5 : Fix compilation of unit tests #

Patch Set 6 : Address asvitkine comments #

Patch Set 7 : Fix PrefServiceSyncableTest.ModelAssociationCloudHasData #

Patch Set 8 : Add migration code to delete the value of the prefs #

Patch Set 9 : Add migration code to delete the value of the prefs #

Patch Set 10 : Rebase #

Total comments: 8

Patch Set 11 : Address comments #

Unified diffs Side-by-side diffs Delta from patch set Stats (+41 lines, -538 lines) Patch
M chrome/browser/prefs/browser_prefs.cc View 1 2 3 4 5 6 7 8 9 10 3 chunks +16 lines, -0 lines 0 comments Download
M chrome/browser/prefs/chrome_pref_model_associator_client.h View 1 2 3 4 5 6 7 8 9 1 chunk +0 lines, -4 lines 0 comments Download
M chrome/browser/prefs/chrome_pref_model_associator_client.cc View 1 2 3 4 5 6 7 8 9 2 chunks +0 lines, -38 lines 0 comments Download
M chrome/browser/prefs/session_startup_pref.cc View 1 2 3 4 5 6 4 chunks +0 lines, -59 lines 0 comments Download
M chrome/common/pref_names.h View 1 2 3 4 5 6 7 8 9 2 chunks +0 lines, -2 lines 0 comments Download
M chrome/common/pref_names.cc View 1 2 3 4 5 6 7 8 9 1 chunk +0 lines, -8 lines 0 comments Download
M chrome/installer/util/master_preferences.cc View 1 2 3 4 5 6 7 8 9 1 chunk +0 lines, -13 lines 0 comments Download
M chrome/installer/util/master_preferences_unittest.cc View 1 2 3 4 5 6 7 8 9 1 chunk +0 lines, -69 lines 0 comments Download
M components/password_manager/sync/browser/password_manager_setting_migrator_service_unittest.cc View 1 2 3 4 5 6 7 8 9 1 chunk +0 lines, -10 lines 0 comments Download
M components/syncable_prefs/pref_model_associator.h View 1 2 3 4 5 6 7 8 9 1 chunk +1 line, -4 lines 0 comments Download
M components/syncable_prefs/pref_model_associator.cc View 1 2 3 4 5 6 7 8 9 9 chunks +17 lines, -109 lines 0 comments Download
M components/syncable_prefs/pref_model_associator_client.h View 1 2 3 4 5 6 7 8 9 1 chunk +0 lines, -10 lines 0 comments Download
M components/syncable_prefs/pref_model_associator_unittest.cc View 1 2 3 4 5 6 7 8 9 1 chunk +0 lines, -10 lines 0 comments Download
M components/syncable_prefs/pref_service_syncable_unittest.cc View 1 2 3 4 5 6 7 8 9 10 5 chunks +1 line, -186 lines 0 comments Download
M ios/chrome/browser/prefs/ios_chrome_pref_model_associator_client.h View 1 2 3 4 5 6 7 8 9 1 chunk +0 lines, -4 lines 0 comments Download
M ios/chrome/browser/prefs/ios_chrome_pref_model_associator_client.cc View 1 2 3 4 5 6 7 8 9 1 chunk +0 lines, -12 lines 0 comments Download
M tools/metrics/histograms/histograms.xml View 1 2 3 4 5 6 7 8 9 10 1 chunk +6 lines, -0 lines 0 comments Download

Dependent Patchsets:

Messages

Total messages: 43 (11 generated)
sdefresne
Please take a look.
5 years, 4 months ago (2015-08-21 12:58:23 UTC) #2
sdefresne
ping?
5 years, 4 months ago (2015-08-24 13:49:22 UTC) #3
gab
On 2015/08/24 13:49:22, sdefresne wrote: > ping? Looking but first, curious why you say M19? ...
5 years, 4 months ago (2015-08-24 21:26:40 UTC) #4
gab
+robert/mad, FYI, some old migration code of yours being cleaned up :-)
5 years, 4 months ago (2015-08-24 21:29:51 UTC) #5
MAD
Cool! thanks... :-) Le lun. 24 août 2015 à 17:29, <gab@chromium.org> a écrit : > ...
5 years, 4 months ago (2015-08-24 21:33:48 UTC) #6
gab
+zea, see question below Please cross-reference with https://codereview.chromium.org/24930003 which introduced this code to see if ...
5 years, 4 months ago (2015-08-24 21:48:46 UTC) #8
sdefresne
5 years, 4 months ago (2015-08-25 07:37:03 UTC) #10
sdefresne
On 2015/08/24 at 21:48:46, gab wrote: > +zea, see question below > > Please cross-reference ...
5 years, 4 months ago (2015-08-25 07:37:24 UTC) #11
sdefresne
On 2015/08/24 at 21:26:40, gab wrote: > On 2015/08/24 13:49:22, sdefresne wrote: > > ping? ...
5 years, 4 months ago (2015-08-25 08:32:08 UTC) #12
sdefresne
https://codereview.chromium.org/1302303002/diff/1/chrome/browser/prefs/session_startup_pref.cc File chrome/browser/prefs/session_startup_pref.cc (left): https://codereview.chromium.org/1302303002/diff/1/chrome/browser/prefs/session_startup_pref.cc#oldcode21 chrome/browser/prefs/session_startup_pref.cc:21: enum StartupURLsMigrationMetrics { On 2015/08/24 at 21:48:45, gab wrote: ...
5 years, 4 months ago (2015-08-25 08:36:11 UTC) #13
Nicolas Zea
LG at a high level https://codereview.chromium.org/1302303002/diff/1/chrome/browser/prefs/pref_model_associator.cc File chrome/browser/prefs/pref_model_associator.cc (right): https://codereview.chromium.org/1302303002/diff/1/chrome/browser/prefs/pref_model_associator.cc#newcode63 chrome/browser/prefs/pref_model_associator.cc:63: { NULL, NULL }, ...
5 years, 4 months ago (2015-08-25 17:10:30 UTC) #14
sdefresne
Please take another look. https://codereview.chromium.org/1302303002/diff/1/chrome/browser/prefs/pref_model_associator.cc File chrome/browser/prefs/pref_model_associator.cc (right): https://codereview.chromium.org/1302303002/diff/1/chrome/browser/prefs/pref_model_associator.cc#newcode63 chrome/browser/prefs/pref_model_associator.cc:63: { NULL, NULL }, On ...
5 years, 3 months ago (2015-08-26 16:00:56 UTC) #15
sdefresne
5 years, 3 months ago (2015-08-26 16:17:30 UTC) #17
Nicolas Zea
pref_model_associator changes LGTM
5 years, 3 months ago (2015-08-26 16:57:37 UTC) #18
gab
lgtm, thanks for this cleanup :-) https://codereview.chromium.org/1302303002/diff/40001/chrome/browser/prefs/pref_model_associator.h File chrome/browser/prefs/pref_model_associator.h (right): https://codereview.chromium.org/1302303002/diff/40001/chrome/browser/prefs/pref_model_associator.h#newcode15 chrome/browser/prefs/pref_model_associator.h:15: #include "base/gtest_prod_util.h" rm ...
5 years, 3 months ago (2015-08-27 18:01:50 UTC) #19
sdefresne
asvitkine: can you review tools/metrics/histograms/histograms.xml
5 years, 3 months ago (2015-08-31 09:46:01 UTC) #21
Alexei Svitkine (slow)
lgtm https://codereview.chromium.org/1302303002/diff/60001/chrome/browser/prefs/pref_model_associator.cc File chrome/browser/prefs/pref_model_associator.cc (right): https://codereview.chromium.org/1302303002/diff/60001/chrome/browser/prefs/pref_model_associator.cc#newcode184 chrome/browser/prefs/pref_model_associator.cc:184: } else { Nit: No need for } ...
5 years, 3 months ago (2015-08-31 15:08:12 UTC) #22
bartfab (slow)
I am not sure we are ready to remove this code. UMA shows that all ...
5 years, 3 months ago (2015-08-31 15:49:19 UTC) #24
gab
On 2015/08/31 15:49:19, bartfab wrote: > I am not sure we are ready to remove ...
5 years, 3 months ago (2015-08-31 16:57:27 UTC) #25
sdefresne
Thank you for the review. bartfab@: do you think this should land or not now ...
5 years, 3 months ago (2015-09-02 11:23:37 UTC) #26
bartfab (slow)
On 2015/09/02 11:23:37, sdefresne wrote: > Thank you for the review. > > bartfab@: do ...
5 years, 3 months ago (2015-09-02 11:41:33 UTC) #27
gab
On 2015/09/02 11:41:33, bartfab (slow) wrote: > On 2015/09/02 11:23:37, sdefresne wrote: > > Thank ...
5 years, 1 month ago (2015-11-12 13:43:56 UTC) #28
sdefresne
On 2015/11/12 at 13:43:56, gab wrote: > On 2015/09/02 11:41:33, bartfab (slow) wrote: > > ...
5 years, 1 month ago (2015-11-12 13:59:20 UTC) #29
bartfab (slow)
On 2015/11/12 13:59:20, sdefresne wrote: > On 2015/11/12 at 13:43:56, gab wrote: > > On ...
5 years, 1 month ago (2015-11-12 14:05:42 UTC) #30
sdefresne
gab: Please take another look!
5 years ago (2015-12-02 12:12:47 UTC) #32
gab
I'm amazed by how much code was supporting this lone migration..! So glad this is ...
5 years ago (2015-12-02 21:06:52 UTC) #33
sdefresne
Thank you for the review. https://codereview.chromium.org/1302303002/diff/180001/chrome/browser/prefs/browser_prefs.cc File chrome/browser/prefs/browser_prefs.cc (right): https://codereview.chromium.org/1302303002/diff/180001/chrome/browser/prefs/browser_prefs.cc#newcode239 chrome/browser/prefs/browser_prefs.cc:239: // by "session.startup_urls_migration_time". Both ...
5 years ago (2015-12-03 10:02:30 UTC) #35
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1302303002/200001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1302303002/200001
5 years ago (2015-12-03 13:50:20 UTC) #38
sdefresne
I'm sending the CL to the CQ as I've addressed all comments and replied to ...
5 years ago (2015-12-03 13:52:07 UTC) #39
commit-bot: I haz the power
Committed patchset #11 (id:200001)
5 years ago (2015-12-03 15:06:27 UTC) #40
commit-bot: I haz the power
Patchset 11 (id:??) landed as https://crrev.com/39dc3a1ffc119ce551abb056057c7076b8017401 Cr-Commit-Position: refs/heads/master@{#362981}
5 years ago (2015-12-03 15:07:14 UTC) #42
gab
5 years ago (2015-12-03 15:25:37 UTC) #43
Message was sent while issue was closed.
lgtm

https://codereview.chromium.org/1302303002/diff/180001/components/syncable_pr...
File components/syncable_prefs/pref_model_associator.cc (right):

https://codereview.chromium.org/1302303002/diff/180001/components/syncable_pr...
components/syncable_prefs/pref_model_associator.cc:194:
remaining_preferences.erase(sync_pref_name);
On 2015/12/03 10:02:29, sdefresne wrote:
> On 2015/12/02 at 21:06:51, gab wrote:
> > If I'm reading the old logic correctly, this should in the else block of the
> above if?
> 
> There is no else block now as I changed the code from the following :
> 
>   if (condition) {
>     if (false) {
>     } else {
>       continue;
>     }
>   } else {
>     dox();
>   }
> 
> to
> 
>   if (condition) {
>     continue;
>   }
>   dox();
> 
> And thus removed the "else" block as per style-guide (i.e. no "else" if the
"if"
> block contains return/continue).

Ah, indeed, had missed that.

Powered by Google App Engine
This is Rietveld 408576698