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

Issue 8198003: Convert app_launch_index and page_index from int to StringOrdinal. (Closed)

Created:
9 years, 2 months ago by csharp
Modified:
6 years, 1 month ago
CC:
chromium-reviews, Erik does not do reviews, estade+watch_chromium.org, mihaip+watch_chromium.org, Paweł Hajdan Jr., SteveT, Rick Byers
Visibility:
Public.

Description

Convert app_launch_index and page_index from int to StringOrdinal. This application icon index values are being changed from ints to StringOrdinals to decrease the potential number of syncs required when icons are moved, by only needing to change 1 StringOrdinal instead of all the integers. BUG=61447 TEST=Open up an instance of chromium with multiple application icons and ensure that icons can still have their page and order changed. There should be no behaviour change. Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=114083

Patch Set 1 #

Total comments: 5

Patch Set 2 : Changing strings to StringOrdinals #

Total comments: 8

Patch Set 3 : Adding constness and comments #

Total comments: 54

Patch Set 4 : Addressing review comments #

Total comments: 4

Patch Set 5 : New values called ordinals, old ones called indices #

Patch Set 6 : Fixing compile error in integration test #

Total comments: 48

Patch Set 7 : Adding review comments #

Total comments: 2

Patch Set 8 : Fixing problem with setting app page names #

Total comments: 21

Patch Set 9 : Addressing review comments #

Total comments: 2

Patch Set 10 : Change NULl to NULL #

Total comments: 34

Patch Set 11 : Responding to Comments #

Patch Set 12 : Fixing multimap assignment #

Patch Set 13 : Fixing Page Name changes #

Total comments: 25

Patch Set 14 : Adding migrate unit test #

Patch Set 15 : Correct inlining #

Total comments: 36

Patch Set 16 : Changing ..MinAndMax.. to ..MinOrMax.. #

Total comments: 10

Patch Set 17 : Adding typedef #

Patch Set 18 : Syncing to ToT #

Patch Set 19 : Fixing clang compile #

Unified diffs Side-by-side diffs Delta from patch set Stats (+714 lines, -180 lines) Patch
M chrome/browser/extensions/crx_installer.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 3 chunks +5 lines, -4 lines 0 comments Download
M chrome/browser/extensions/crx_installer.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 2 chunks +1 line, -2 lines 0 comments Download
M chrome/browser/extensions/extension_browsertest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 1 chunk +2 lines, -1 line 0 comments Download
M chrome/browser/extensions/extension_prefs.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 6 chunks +96 lines, -25 lines 0 comments Download
M chrome/browser/extensions/extension_prefs.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 8 chunks +291 lines, -61 lines 0 comments Download
M chrome/browser/extensions/extension_prefs_unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 6 chunks +193 lines, -42 lines 0 comments Download
M chrome/browser/extensions/extension_service.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 1 chunk +3 lines, -1 line 0 comments Download
M chrome/browser/extensions/extension_service.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 2 chunks +4 lines, -2 lines 0 comments Download
M chrome/browser/extensions/test_extension_prefs.cc View 1 2 3 4 5 6 7 8 9 1 chunk +2 lines, -1 line 0 comments Download
M chrome/browser/extensions/unpacked_installer.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 3 chunks +3 lines, -2 lines 0 comments Download
M chrome/browser/resources/ntp4/page_list_view.js View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 1 chunk +2 lines, -2 lines 0 comments Download
M chrome/browser/sync/test/integration/sync_extension_helper.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 2 chunks +2 lines, -1 line 0 comments Download
M chrome/browser/ui/panels/base_panel_browser_test.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 2 chunks +2 lines, -1 line 0 comments Download
M chrome/browser/ui/webui/ntp/app_launcher_handler.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 2 chunks +5 lines, -1 line 0 comments Download
M chrome/browser/ui/webui/ntp/app_launcher_handler.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 10 chunks +58 lines, -34 lines 0 comments Download
M chrome/common/string_ordinal.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 3 chunks +14 lines, -0 lines 0 comments Download
M chrome/common/string_ordinal.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 3 chunks +15 lines, -0 lines 0 comments Download
M chrome/common/string_ordinal_unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 1 chunk +16 lines, -0 lines 0 comments Download

Messages

Total messages: 65 (0 generated)
csharp1
I've run the unit tests to ensure they all still pass and allow manually moved ...
9 years, 2 months ago (2011-10-07 14:22:06 UTC) #1
akalin
http://codereview.chromium.org/8198003/diff/1/chrome/browser/extensions/extension_prefs.cc File chrome/browser/extensions/extension_prefs.cc (right): http://codereview.chromium.org/8198003/diff/1/chrome/browser/extensions/extension_prefs.cc#newcode1399 chrome/browser/extensions/extension_prefs.cc:1399: base::StringToInt(max_value, &new_value); So all I'm seeing are conversions from ...
9 years, 2 months ago (2011-10-07 17:31:15 UTC) #2
csharp1
Ok, this review is going to be put on hold for a bit. I'm going ...
9 years, 2 months ago (2011-10-07 17:44:18 UTC) #3
akalin
On 2011/10/07 17:31:15, akalin wrote: > So an example of using strings would be to ...
9 years, 2 months ago (2011-10-07 20:48:03 UTC) #4
Mihai Parparita -not on Chrome
http://codereview.chromium.org/8198003/diff/1/chrome/browser/extensions/extension_prefs.cc File chrome/browser/extensions/extension_prefs.cc (right): http://codereview.chromium.org/8198003/diff/1/chrome/browser/extensions/extension_prefs.cc#newcode96 chrome/browser/extensions/extension_prefs.cc:96: const char kPrefAppLaunchIndexDepreciated[] = "app_launcher_index"; Typo (use "Deprecated" instead ...
9 years, 2 months ago (2011-10-07 23:15:12 UTC) #5
csharp
The code is now updated to use the new StringOrdinal class instead of integers. I've ...
9 years, 1 month ago (2011-11-11 18:13:32 UTC) #6
Evan Stade
this looks relevant to dbeam's work
9 years, 1 month ago (2011-11-11 22:34:04 UTC) #7
Dan Beam
http://codereview.chromium.org/8198003/diff/14001/chrome/browser/extensions/extension_prefs.cc File chrome/browser/extensions/extension_prefs.cc (left): http://codereview.chromium.org/8198003/diff/14001/chrome/browser/extensions/extension_prefs.cc#oldcode860 chrome/browser/extensions/extension_prefs.cc:860: When is the EOL of this migration code? http://codereview.chromium.org/8198003/diff/14001/chrome/browser/extensions/extension_prefs.cc ...
9 years, 1 month ago (2011-11-12 02:28:30 UTC) #8
csharp
http://codereview.chromium.org/8198003/diff/14001/chrome/browser/extensions/extension_prefs.cc File chrome/browser/extensions/extension_prefs.cc (left): http://codereview.chromium.org/8198003/diff/14001/chrome/browser/extensions/extension_prefs.cc#oldcode860 chrome/browser/extensions/extension_prefs.cc:860: I don't know what the EOL should be for ...
9 years, 1 month ago (2011-11-14 16:22:28 UTC) #9
Dan Beam
lgtm with comment (btw, I'm only provisional at the moment): The reason I asked you ...
9 years, 1 month ago (2011-11-15 18:57:20 UTC) #10
csharp
Any comments from the other reviewers?
9 years, 1 month ago (2011-11-16 18:44:41 UTC) #11
Mihai Parparita -not on Chrome
The number of index-related methods in ExtensionPrefs has doubled, which makes things harder to follow ...
9 years, 1 month ago (2011-11-16 20:56:10 UTC) #12
akalin
Some initial comments and a high-level one: It would probably be cleaner to consistently refer ...
9 years, 1 month ago (2011-11-17 03:06:32 UTC) #13
Finnur
BUG= is missing bug ID. Also, rbyers should at least get a CC, since this ...
9 years, 1 month ago (2011-11-17 14:59:25 UTC) #14
csharp
Most of the issues addressed but I have two questions: 1) akalin, I assume you're ...
9 years, 1 month ago (2011-11-17 19:51:58 UTC) #15
akalin
On Thu, Nov 17, 2011 at 11:51 AM, <csharp@chromium.org> wrote: > Most of the issues ...
9 years, 1 month ago (2011-11-17 20:04:52 UTC) #16
Finnur
LGTM > Should I do that in this change or add a bug to > ...
9 years, 1 month ago (2011-11-18 09:35:15 UTC) #17
csharp
Ok, all locations that use the new ordinals should refer to them as such and ...
9 years, 1 month ago (2011-11-18 15:57:30 UTC) #18
Finnur
http://codereview.chromium.org/8198003/diff/35001/chrome/browser/ui/webui/ntp/app_launcher_handler.cc File chrome/browser/ui/webui/ntp/app_launcher_handler.cc (right): http://codereview.chromium.org/8198003/diff/35001/chrome/browser/ui/webui/ntp/app_launcher_handler.cc#newcode359 chrome/browser/ui/webui/ntp/app_launcher_handler.cc:359: // This is necessary because in some previous versions ...
9 years, 1 month ago (2011-11-21 12:16:14 UTC) #19
csharp
http://codereview.chromium.org/8198003/diff/35001/chrome/browser/ui/webui/ntp/app_launcher_handler.cc File chrome/browser/ui/webui/ntp/app_launcher_handler.cc (right): http://codereview.chromium.org/8198003/diff/35001/chrome/browser/ui/webui/ntp/app_launcher_handler.cc#newcode359 chrome/browser/ui/webui/ntp/app_launcher_handler.cc:359: // This is necessary because in some previous versions ...
9 years, 1 month ago (2011-11-21 15:14:32 UTC) #20
Finnur
http://codereview.chromium.org/8198003/diff/35001/chrome/browser/ui/webui/ntp/app_launcher_handler.cc File chrome/browser/ui/webui/ntp/app_launcher_handler.cc (right): http://codereview.chromium.org/8198003/diff/35001/chrome/browser/ui/webui/ntp/app_launcher_handler.cc#newcode359 chrome/browser/ui/webui/ntp/app_launcher_handler.cc:359: // This is necessary because in some previous versions ...
9 years, 1 month ago (2011-11-21 15:23:20 UTC) #21
csharp
Ah, I see what you're saying, I misunderstood. I don't think any extension can have ...
9 years, 1 month ago (2011-11-21 15:31:13 UTC) #22
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/csharp@chromium.org/8198003/46001
9 years, 1 month ago (2011-11-21 15:31:40 UTC) #23
csharp
Commit queue showed me that I had forget to compile sync_integration_tests and one of those ...
9 years, 1 month ago (2011-11-21 16:55:24 UTC) #24
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/csharp@chromium.org/8198003/51002
9 years, 1 month ago (2011-11-21 17:44:25 UTC) #25
commit-bot: I haz the power
Presubmit check for 8198003-51002 failed and returned exit status 1. Running presubmit commit checks ...
9 years, 1 month ago (2011-11-21 17:44:54 UTC) #26
akalin
mostly nits, a few more substantial comments http://codereview.chromium.org/8198003/diff/51002/chrome/browser/extensions/extension_prefs.cc File chrome/browser/extensions/extension_prefs.cc (right): http://codereview.chromium.org/8198003/diff/51002/chrome/browser/extensions/extension_prefs.cc#newcode255 chrome/browser/extensions/extension_prefs.cc:255: app_launch_index(app_launch) {} ...
9 years, 1 month ago (2011-11-21 19:49:24 UTC) #27
Aaron Boodman
On 2011/11/16 20:56:10, Mihai Parparita wrote: > The number of index-related methods in ExtensionPrefs has ...
9 years, 1 month ago (2011-11-22 09:32:40 UTC) #28
Evan Stade
http://codereview.chromium.org/8198003/diff/60001/chrome/browser/ui/webui/ntp/app_launcher_handler.cc File chrome/browser/ui/webui/ntp/app_launcher_handler.cc (right): http://codereview.chromium.org/8198003/diff/60001/chrome/browser/ui/webui/ntp/app_launcher_handler.cc#newcode861 chrome/browser/ui/webui/ntp/app_launcher_handler.cc:861: pref_service->RegisterDictionaryPref(prefs::kNTPAppPageNames, there are no problems with migration here?
9 years, 1 month ago (2011-11-22 22:50:37 UTC) #29
csharp
Fixed an issue with changing the app page names and publishing comments from yesterday's update ...
9 years, 1 month ago (2011-11-23 15:38:06 UTC) #30
akalin
Some more comments http://codereview.chromium.org/8198003/diff/64001/chrome/browser/extensions/extension_prefs.cc File chrome/browser/extensions/extension_prefs.cc (right): http://codereview.chromium.org/8198003/diff/64001/chrome/browser/extensions/extension_prefs.cc#newcode938 chrome/browser/extensions/extension_prefs.cc:938: if (ReadExtensionPrefInteger(*(ext->application_id), why is this conditional ...
9 years, 1 month ago (2011-11-23 18:50:19 UTC) #31
Evan Stade
http://codereview.chromium.org/8198003/diff/64001/chrome/browser/ui/webui/ntp/app_launcher_handler.cc File chrome/browser/ui/webui/ntp/app_launcher_handler.cc (right): http://codereview.chromium.org/8198003/diff/64001/chrome/browser/ui/webui/ntp/app_launcher_handler.cc#newcode435 chrome/browser/ui/webui/ntp/app_launcher_handler.cc:435: dictionary->Set("appPageNames", list); On 2011/11/23 15:38:07, csharp wrote: > This ...
9 years, 1 month ago (2011-11-23 21:54:51 UTC) #32
csharp
http://codereview.chromium.org/8198003/diff/64001/chrome/browser/extensions/extension_prefs.cc File chrome/browser/extensions/extension_prefs.cc (right): http://codereview.chromium.org/8198003/diff/64001/chrome/browser/extensions/extension_prefs.cc#newcode938 chrome/browser/extensions/extension_prefs.cc:938: if (ReadExtensionPrefInteger(*(ext->application_id), On 2011/11/23 18:50:19, akalin wrote: > why ...
9 years, 1 month ago (2011-11-23 22:10:01 UTC) #33
Dan Beam
ping akalin, estade, mihaip Hey dudes, I need to (semi-non-trivially) integrate with this code as ...
9 years ago (2011-11-29 01:28:24 UTC) #34
Dan Beam
Also, csharp, I think the issue's description (and future commit message) should be BUG=61447 now, ...
9 years ago (2011-11-29 01:29:45 UTC) #35
csharp
Bug id updated. http://codereview.chromium.org/8198003/diff/70002/chrome/browser/extensions/extension_prefs.h File chrome/browser/extensions/extension_prefs.h (right): http://codereview.chromium.org/8198003/diff/70002/chrome/browser/extensions/extension_prefs.h#newcode561 chrome/browser/extensions/extension_prefs.h:561: // NULl values for |min_app_launch_value| or ...
9 years ago (2011-11-29 14:50:50 UTC) #36
akalin
More comments http://codereview.chromium.org/8198003/diff/64001/chrome/browser/extensions/extension_prefs.cc File chrome/browser/extensions/extension_prefs.cc (right): http://codereview.chromium.org/8198003/diff/64001/chrome/browser/extensions/extension_prefs.cc#newcode942 chrome/browser/extensions/extension_prefs.cc:942: if (!page.IsValid()) { On 2011/11/23 22:10:01, csharp ...
9 years ago (2011-11-29 18:39:09 UTC) #37
csharp
http://codereview.chromium.org/8198003/diff/64001/chrome/browser/extensions/extension_prefs.cc File chrome/browser/extensions/extension_prefs.cc (right): http://codereview.chromium.org/8198003/diff/64001/chrome/browser/extensions/extension_prefs.cc#newcode942 chrome/browser/extensions/extension_prefs.cc:942: if (!page.IsValid()) { On 2011/11/29 18:39:09, akalin wrote: > ...
9 years ago (2011-11-29 21:21:40 UTC) #38
csharp
Fixed a bug with app_page_names being incorrectly converted from a list to a dictionary. Didn't ...
9 years ago (2011-11-30 15:50:09 UTC) #39
akalin
More comments http://codereview.chromium.org/8198003/diff/89001/chrome/browser/extensions/extension_prefs.cc File chrome/browser/extensions/extension_prefs.cc (right): http://codereview.chromium.org/8198003/diff/89001/chrome/browser/extensions/extension_prefs.cc#newcode878 chrome/browser/extensions/extension_prefs.cc:878: // Convert all the page index values ...
9 years ago (2011-12-01 02:57:47 UTC) #40
akalin
So at each iteration, I keep finding new bugs, and I'm still just reviewing only ...
9 years ago (2011-12-01 03:00:23 UTC) #41
akalin
On 2011/12/01 03:00:23, akalin wrote: > So at each iteration, I keep finding new bugs, ...
9 years ago (2011-12-01 03:02:13 UTC) #42
csharp
Most of the code does have test, but the migration code didn't. I wasn't sure ...
9 years ago (2011-12-01 20:15:09 UTC) #43
akalin
http://codereview.chromium.org/8198003/diff/89001/chrome/browser/extensions/extension_prefs.cc File chrome/browser/extensions/extension_prefs.cc (right): http://codereview.chromium.org/8198003/diff/89001/chrome/browser/extensions/extension_prefs.cc#newcode1206 chrome/browser/extensions/extension_prefs.cc:1206: StringOrdinal new_page_ordinal = GetNaturalAppPageOrdinal(); On 2011/12/01 20:15:09, csharp wrote: ...
9 years ago (2011-12-01 20:42:46 UTC) #44
akalin
More comments http://codereview.chromium.org/8198003/diff/99001/chrome/browser/extensions/extension_prefs.cc File chrome/browser/extensions/extension_prefs.cc (right): http://codereview.chromium.org/8198003/diff/99001/chrome/browser/extensions/extension_prefs.cc#newcode886 chrome/browser/extensions/extension_prefs.cc:886: std::map<StringOrdinal, std::map<int, const std::string*>, use typedefs (scoped ...
9 years ago (2011-12-02 19:48:23 UTC) #45
csharp
http://codereview.chromium.org/8198003/diff/99001/chrome/browser/extensions/extension_prefs.cc File chrome/browser/extensions/extension_prefs.cc (right): http://codereview.chromium.org/8198003/diff/99001/chrome/browser/extensions/extension_prefs.cc#newcode886 chrome/browser/extensions/extension_prefs.cc:886: std::map<StringOrdinal, std::map<int, const std::string*>, On 2011/12/02 19:48:23, akalin wrote: ...
9 years ago (2011-12-05 15:30:23 UTC) #46
akalin
LGTM http://codereview.chromium.org/8198003/diff/104001/chrome/browser/extensions/extension_prefs.cc File chrome/browser/extensions/extension_prefs.cc (right): http://codereview.chromium.org/8198003/diff/104001/chrome/browser/extensions/extension_prefs.cc#newcode933 chrome/browser/extensions/extension_prefs.cc:933: for (std::map<StringOrdinal, int, StringOrdinalLessThan>::iterator it = use typedef ...
9 years ago (2011-12-06 17:48:24 UTC) #47
akalin
On 2011/12/06 17:48:24, akalin wrote: > LGTM Thanks for your patience! I think the code ...
9 years ago (2011-12-06 17:49:12 UTC) #48
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/csharp@chromium.org/8198003/104001
9 years ago (2011-12-06 17:57:24 UTC) #49
commit-bot: I haz the power
Presubmit check for 8198003-104001 failed and returned exit status 1. Running presubmit commit checks ...
9 years ago (2011-12-06 17:57:33 UTC) #50
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/csharp@chromium.org/8198003/104001
9 years ago (2011-12-06 17:58:09 UTC) #51
commit-bot: I haz the power
Presubmit check for 8198003-104001 failed and returned exit status 1. Running presubmit commit checks ...
9 years ago (2011-12-06 17:58:17 UTC) #52
csharp
estade@, could you have another look at this review when you get a chance. I ...
9 years ago (2011-12-06 19:06:50 UTC) #53
Evan Stade
if you responded to my last question, I can't find it. Can you repeat whatever ...
9 years ago (2011-12-06 21:44:27 UTC) #54
csharp
Sorry for missing your question before, I didn't have a good answer and I wasn't ...
9 years ago (2011-12-07 15:00:59 UTC) #55
Evan Stade
my question is this: If I have a profile where I have named all my ...
9 years ago (2011-12-07 22:39:27 UTC) #56
csharp
The page names will not be changed. The code doesn't change the pref type anymore ...
9 years ago (2011-12-08 14:01:56 UTC) #57
Evan Stade
but I definitely do think you want to sync this (fix that csilv TODO).
9 years ago (2011-12-09 23:09:04 UTC) #58
csharp
You are correct, I do plan add the syncing code for the page names. I've ...
9 years ago (2011-12-12 16:57:19 UTC) #59
Evan Stade
On 2011/12/12 16:57:19, csharp wrote: > You are correct, I do plan add the syncing ...
9 years ago (2011-12-12 19:40:55 UTC) #60
Evan Stade
lgtm -- Evan Stade On Mon, Dec 12, 2011 at 11:40 AM, <estade@chromium.org> wrote: > ...
9 years ago (2011-12-12 19:44:44 UTC) #61
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/csharp@chromium.org/8198003/119001
9 years ago (2011-12-12 19:46:16 UTC) #62
Evan Stade
clang fix lgtm
9 years ago (2011-12-12 20:39:18 UTC) #63
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/csharp@chromium.org/8198003/123001
9 years ago (2011-12-12 20:42:08 UTC) #64
commit-bot: I haz the power
9 years ago (2011-12-12 21:46:39 UTC) #65
Change committed as 114083

Powered by Google App Engine
This is Rietveld 408576698