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

Issue 2506713002: Avoid parsing the webstore base url so much. (Closed)

Created:
4 years, 1 month ago by Charlie Harrison
Modified:
4 years, 1 month ago
Reviewers:
msw, Devlin, Daniel Erat, mmenke
CC:
chromium-reviews, dbeam+watch-ntp_chromium.org, extensions-reviews_chromium.org, cbentzel+watch_chromium.org, ntp-dev+reviews_chromium.org, tburkard+watch_chromium.org, gavinp+prer_chromium.org, oshima+watch_chromium.org, chromium-apps-reviews_chromium.org, davemoore+watch_chromium.org, pedrosimonetti+watch_chromium.org
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Avoid parsing the webstore base url so much. This is a followup to [1] which modified the extension url API to vend GURLs rather than std::string for webstore update urls. This patch does the same for the webstore base url (the webstore "launch" url). We only parse this url in ChromeResourceDispatcherHostDelegate::OnResponseStarted so there is less of a performance win than [1], but still we should avoid doing needless work. Parsing this URL takes ~12% of the CPU time of ResourceLoader::CompleteResponseStarted. [1] https://codereview.chromium.org/2493053002/ BUG=664174 Committed: https://crrev.com/5d1f214db0f7996f3c17cd87093d439ce4c7f8f1 Cr-Commit-Position: refs/heads/master@{#433963}

Patch Set 1 #

Patch Set 2 : remove weird stripping behavior + test #

Patch Set 3 : remove dcheck #

Patch Set 4 : don't assume cmd line urls canonical #

Total comments: 4

Patch Set 5 : rdevlin review #

Total comments: 2

Patch Set 6 : back to using string concat #

Patch Set 7 : remove slash #

Total comments: 1

Patch Set 8 : fix chromeos #

Unified diffs Side-by-side diffs Delta from patch set Stats (+58 lines, -43 lines) Patch
M chrome/browser/chromeos/app_mode/kiosk_app_data.cc View 1 chunk +2 lines, -2 lines 0 comments Download
M chrome/browser/extensions/api/inline_install_private/inline_install_private_apitest.cc View 1 6 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/extensions/webstore_standalone_installer.cc View 1 chunk +1 line, -2 lines 0 comments Download
M chrome/browser/prerender/prerender_browsertest.cc View 1 2 3 4 5 6 7 1 chunk +3 lines, -3 lines 0 comments Download
M chrome/browser/ui/app_list/search/webstore/webstore_provider_browsertest.cc View 1 2 3 4 5 6 7 1 chunk +4 lines, -1 line 0 comments Download
M chrome/browser/ui/webui/ntp/ntp_resource_cache.cc View 1 chunk +4 lines, -3 lines 0 comments Download
M chrome/common/extensions/chrome_extensions_client.h View 2 chunks +2 lines, -1 line 0 comments Download
M chrome/common/extensions/chrome_extensions_client.cc View 1 2 3 4 3 chunks +15 lines, -13 lines 0 comments Download
M extensions/common/extension_urls.h View 1 chunk +1 line, -1 line 0 comments Download
M extensions/common/extension_urls.cc View 1 2 3 4 5 6 7 2 chunks +13 lines, -8 lines 0 comments Download
M extensions/common/extensions_client.h View 1 chunk +1 line, -1 line 0 comments Download
M extensions/shell/common/shell_extensions_client.h View 2 chunks +2 lines, -1 line 0 comments Download
M extensions/shell/common/shell_extensions_client.cc View 2 chunks +3 lines, -2 lines 0 comments Download
M extensions/test/test_extensions_client.h View 2 chunks +2 lines, -1 line 0 comments Download
M extensions/test/test_extensions_client.cc View 2 chunks +4 lines, -3 lines 0 comments Download

Messages

Total messages: 67 (45 generated)
Charlie Harrison
Devlin, here's the followup to the webstore update url optimization. Review sent to you because ...
4 years, 1 month ago (2016-11-16 18:50:52 UTC) #17
Devlin
On 2016/11/16 18:50:52, Charlie Harrison wrote: > Devlin, here's the followup to the webstore update ...
4 years, 1 month ago (2016-11-16 19:11:52 UTC) #18
Charlie Harrison
Thanks! https://codereview.chromium.org/2506713002/diff/60001/chrome/common/extensions/chrome_extensions_client.cc File chrome/common/extensions/chrome_extensions_client.cc (right): https://codereview.chromium.org/2506713002/diff/60001/chrome/common/extensions/chrome_extensions_client.cc#newcode281 chrome/common/extensions/chrome_extensions_client.cc:281: } else if (webstore_base_url_.is_empty()) { On 2016/11/16 19:11:52, ...
4 years, 1 month ago (2016-11-16 21:45:19 UTC) #23
Devlin
lgtm
4 years, 1 month ago (2016-11-16 22:07:53 UTC) #24
Charlie Harrison
https://codereview.chromium.org/2506713002/diff/80001/extensions/common/extension_urls.cc File extensions/common/extension_urls.cc (right): https://codereview.chromium.org/2506713002/diff/80001/extensions/common/extension_urls.cc#newcode47 extensions/common/extension_urls.cc:47: return GetWebstoreLaunchURL().Resolve("/category/extensions").spec(); Using Resolve() here and below is causing ...
4 years, 1 month ago (2016-11-21 01:21:24 UTC) #27
Devlin
https://codereview.chromium.org/2506713002/diff/80001/extensions/common/extension_urls.cc File extensions/common/extension_urls.cc (right): https://codereview.chromium.org/2506713002/diff/80001/extensions/common/extension_urls.cc#newcode47 extensions/common/extension_urls.cc:47: return GetWebstoreLaunchURL().Resolve("/category/extensions").spec(); On 2016/11/21 01:21:24, Charlie Harrison wrote: > ...
4 years, 1 month ago (2016-11-21 15:39:32 UTC) #28
Charlie Harrison
Thanks, I added the TODO and reverted the Resolve() calls. I'll wait for a final ...
4 years, 1 month ago (2016-11-21 16:39:11 UTC) #31
Devlin
lgtm https://codereview.chromium.org/2506713002/diff/120001/extensions/common/extension_urls.cc File extensions/common/extension_urls.cc (right): https://codereview.chromium.org/2506713002/diff/120001/extensions/common/extension_urls.cc#newcode43 extensions/common/extension_urls.cc:43: // TODO(csharrison,rdevlin.cronin): Migrate the following methods to return ...
4 years, 1 month ago (2016-11-21 22:10:53 UTC) #36
Charlie Harrison
Done. Had to fix a minor issue in webstore_provider_browsertest.cc for chromeos but I also fixed ...
4 years, 1 month ago (2016-11-22 03:19:19 UTC) #41
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2506713002/140001
4 years, 1 month ago (2016-11-22 03:38:01 UTC) #46
commit-bot: I haz the power
Try jobs failed on following builders: chromium_presubmit on master.tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/chromium_presubmit/builds/310189)
4 years, 1 month ago (2016-11-22 03:45:07 UTC) #48
Charlie Harrison
msw@chromium.org: Please review changes in chrome/browser/ui derat@chromium.org: Please review changes in chromeos/app_mode/kiosk_app_data.cc Thanks!
4 years, 1 month ago (2016-11-22 04:17:21 UTC) #50
Daniel Erat
lgtm for c/b/chromeos
4 years, 1 month ago (2016-11-22 15:46:21 UTC) #51
msw
c/b/ui lgtm
4 years, 1 month ago (2016-11-22 18:30:22 UTC) #52
Charlie Harrison
Thanks everyone
4 years, 1 month ago (2016-11-22 18:39:36 UTC) #53
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2506713002/140001
4 years, 1 month ago (2016-11-22 18:40:09 UTC) #55
commit-bot: I haz the power
Try jobs failed on following builders: chromium_presubmit on master.tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/chromium_presubmit/builds/310674)
4 years, 1 month ago (2016-11-22 18:46:46 UTC) #57
Charlie Harrison
+mmenke for prerender browsertest
4 years, 1 month ago (2016-11-22 20:00:32 UTC) #59
mmenke
On 2016/11/22 20:00:32, Charlie Harrison wrote: > +mmenke for prerender browsertest prerender/ LGTM
4 years, 1 month ago (2016-11-22 20:12:39 UTC) #60
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2506713002/140001
4 years, 1 month ago (2016-11-22 20:13:47 UTC) #62
commit-bot: I haz the power
Committed patchset #8 (id:140001)
4 years, 1 month ago (2016-11-22 20:26:29 UTC) #65
commit-bot: I haz the power
4 years, 1 month ago (2016-11-22 20:29:07 UTC) #67
Message was sent while issue was closed.
Patchset 8 (id:??) landed as
https://crrev.com/5d1f214db0f7996f3c17cd87093d439ce4c7f8f1
Cr-Commit-Position: refs/heads/master@{#433963}

Powered by Google App Engine
This is Rietveld 408576698