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

Issue 2489233003: [extensions] Remove unnecessary checks in IsSensitiveURL (Closed)

Created:
4 years, 1 month ago by Charlie Harrison
Modified:
4 years, 1 month ago
Reviewers:
Devlin
CC:
chromium-reviews, chromium-apps-reviews_chromium.org, extensions-reviews_chromium.org
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

[extensions] Remove unnecessary checks in IsSensitiveURL The current code re-parses the url by removing the query and ref components before sending the modified URL to IsWebstoreUpdateUrl. This is not necessary, as IsWebstoreUpdateUrl will return true if the host and path are identical. Creating the modified URL takes ~3-4% of the total task time on the IOthread when loading http://cr.kungfoo.net/loading/1000spacers/ This CL also cleans up checks in the IsSensitiveURL function. BUG=664174, 664285 Committed: https://crrev.com/b8ec6582c1c86524b3cb47dbf65605213d35930e Cr-Commit-Position: refs/heads/master@{#431432}

Patch Set 1 #

Total comments: 7

Patch Set 2 : Fix up code and write unit tests #

Total comments: 4

Patch Set 3 : more DomainIs #

Unified diffs Side-by-side diffs Delta from patch set Stats (+76 lines, -40 lines) Patch
M extensions/browser/BUILD.gn View 1 1 chunk +1 line, -0 lines 0 comments Download
M extensions/browser/api/web_request/web_request_permissions.h View 1 1 chunk +3 lines, -0 lines 0 comments Download
M extensions/browser/api/web_request/web_request_permissions.cc View 1 2 4 chunks +29 lines, -33 lines 0 comments Download
A extensions/browser/api/web_request/web_request_permissions_unittest.cc View 1 1 chunk +40 lines, -0 lines 0 comments Download
M extensions/common/extension_urls.cc View 1 chunk +2 lines, -6 lines 0 comments Download
M extensions/test/test_extensions_client.cc View 1 1 chunk +1 line, -1 line 0 comments Download

Messages

Total messages: 25 (15 generated)
Charlie Harrison
Devlin, would you mind taking a look at this patch? I feel like removing unnecessary ...
4 years, 1 month ago (2016-11-10 20:02:23 UTC) #4
Devlin
Your code's all good, but let's make the surrounding code even better! :) https://codereview.chromium.org/2489233003/diff/1/extensions/browser/api/web_request/web_request_permissions.cc File ...
4 years, 1 month ago (2016-11-10 20:57:15 UTC) #7
Charlie Harrison
PTAL. My main concern is with changing the test extension client method, and whether or ...
4 years, 1 month ago (2016-11-10 22:10:20 UTC) #12
Devlin
lgtm https://codereview.chromium.org/2489233003/diff/20001/extensions/browser/api/web_request/web_request_permissions.cc File extensions/browser/api/web_request/web_request_permissions.cc (right): https://codereview.chromium.org/2489233003/diff/20001/extensions/browser/api/web_request/web_request_permissions.cc#newcode72 extensions/browser/api/web_request/web_request_permissions.cc:72: url.host_piece() == "sb-ssl.google.com" || hmm... maybe also just ...
4 years, 1 month ago (2016-11-10 22:26:40 UTC) #13
Charlie Harrison
Thanks! https://codereview.chromium.org/2489233003/diff/20001/extensions/browser/api/web_request/web_request_permissions.cc File extensions/browser/api/web_request/web_request_permissions.cc (right): https://codereview.chromium.org/2489233003/diff/20001/extensions/browser/api/web_request/web_request_permissions.cc#newcode72 extensions/browser/api/web_request/web_request_permissions.cc:72: url.host_piece() == "sb-ssl.google.com" || On 2016/11/10 22:26:39, Devlin ...
4 years, 1 month ago (2016-11-10 22:35:36 UTC) #14
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/2489233003/40001
4 years, 1 month ago (2016-11-10 22:36:56 UTC) #17
commit-bot: I haz the power
Try jobs failed on following builders: ios-device on master.tryserver.chromium.mac (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.mac/builders/ios-device/builds/103694) ios-simulator on master.tryserver.chromium.mac (JOB_FAILED, ...
4 years, 1 month ago (2016-11-10 23:18:59 UTC) #19
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/2489233003/40001
4 years, 1 month ago (2016-11-11 00:50:14 UTC) #21
commit-bot: I haz the power
Committed patchset #3 (id:40001)
4 years, 1 month ago (2016-11-11 01:05:41 UTC) #23
commit-bot: I haz the power
4 years, 1 month ago (2016-11-11 01:10:15 UTC) #25
Message was sent while issue was closed.
Patchset 3 (id:??) landed as
https://crrev.com/b8ec6582c1c86524b3cb47dbf65605213d35930e
Cr-Commit-Position: refs/heads/master@{#431432}

Powered by Google App Engine
This is Rietveld 408576698