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

Issue 8205001: (Owner approval for) Delay network requests on startup if any webRequest ... (Closed)

Created:
9 years, 2 months ago by Pam (message me for reviews)
Modified:
9 years, 2 months ago
CC:
chromium-reviews, Erik does not do reviews, dpranke+watch-content_chromium.org, jam, mihaip+watch_chromium.org, joi+watch-content_chromium.org, darin-cc_chromium.org
Visibility:
Public.

Description

Delay network requests on startup if any webRequest or webNavigation extensions are enabled. Add a webRequest extension API permission, used to tell when an extension uses that API and therefore wants to delay startup. Use the "tabs" warning for it. Also clean up the UserScriptListener, which never released requests individually and so doesn't need to track them individually either, and makes the RequestQueue handle bulk releases by its delegates instead. BUG=99450 TEST=unit_tests.exe --gtest_filter=NetworkDelayListenerTest.* Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=105659

Patch Set 1 #

Patch Set 2 : '' #

Total comments: 14

Patch Set 3 : '' #

Patch Set 4 : '' #

Total comments: 3

Patch Set 5 : '' #

Patch Set 6 : Fix order of initialization #

Patch Set 7 : Fix signed-unsigned comparison #

Patch Set 8 : Updated checkout #

Patch Set 9 : Resync, fix compile errors #

Total comments: 1

Patch Set 10 : Updated checkout #

Unified diffs Side-by-side diffs Delta from patch set Stats (+744 lines, -60 lines) Patch
M chrome/app/generated_resources.grd View 1 2 3 4 5 6 7 8 9 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/browser_process_impl.cc View 1 2 3 4 5 6 7 8 9 2 chunks +3 lines, -1 line 0 comments Download
M chrome/browser/extensions/extension_host.h View 1 2 3 4 5 6 7 8 9 1 chunk +3 lines, -0 lines 0 comments Download
M chrome/browser/extensions/extension_host.cc View 1 2 3 4 5 6 7 8 9 2 chunks +19 lines, -1 line 0 comments Download
M chrome/browser/extensions/extension_prefs.h View 1 2 3 4 5 6 7 8 9 2 chunks +9 lines, -1 line 0 comments Download
M chrome/browser/extensions/extension_prefs.cc View 1 2 3 4 5 6 7 8 9 3 chunks +22 lines, -0 lines 0 comments Download
M chrome/browser/extensions/extension_service.cc View 1 2 3 4 5 6 7 8 9 1 chunk +6 lines, -0 lines 0 comments Download
M chrome/browser/extensions/extension_webrequest_time_tracker.cc View 1 2 3 4 5 6 7 8 9 1 chunk +1 line, -1 line 0 comments Download
A chrome/browser/extensions/network_delay_listener.h View 1 2 3 4 5 1 chunk +103 lines, -0 lines 0 comments Download
A chrome/browser/extensions/network_delay_listener.cc View 1 2 3 4 5 6 7 8 1 chunk +178 lines, -0 lines 0 comments Download
A chrome/browser/extensions/network_delay_listener_unittest.cc View 1 2 3 4 5 6 7 8 1 chunk +284 lines, -0 lines 0 comments Download
M chrome/browser/extensions/user_script_listener.h View 1 2 3 4 5 6 7 8 9 3 chunks +1 line, -6 lines 0 comments Download
M chrome/browser/extensions/user_script_listener.cc View 1 2 3 4 5 6 7 8 9 10 chunks +11 lines, -19 lines 0 comments Download
M chrome/chrome_browser.gypi View 1 2 3 4 5 6 7 8 9 1 chunk +2 lines, -0 lines 0 comments Download
M chrome/chrome_tests.gypi View 1 2 3 4 5 6 7 8 9 1 chunk +1 line, -0 lines 0 comments Download
M chrome/common/extensions/extension.h View 1 2 3 4 5 6 7 8 9 1 chunk +5 lines, -0 lines 0 comments Download
M chrome/common/extensions/extension.cc View 1 2 3 4 5 6 7 8 9 1 chunk +7 lines, -0 lines 0 comments Download
M chrome/common/extensions/extension_permission_set.h View 1 2 3 4 5 6 7 8 9 1 chunk +1 line, -0 lines 0 comments Download
M chrome/common/extensions/extension_permission_set.cc View 1 2 3 4 5 6 7 8 9 1 chunk +5 lines, -3 lines 0 comments Download
M chrome/common/extensions/extension_permission_set_unittest.cc View 1 2 3 4 5 6 7 8 9 1 chunk +4 lines, -1 line 0 comments Download
A chrome/test/data/extensions/network_delay/aocebcndggcnnmflapdklcmnfojmkmie/1.0/background.html View 1 2 1 chunk +3 lines, -0 lines 0 comments Download
A chrome/test/data/extensions/network_delay/aocebcndggcnnmflapdklcmnfojmkmie/1.0/manifest.json View 1 2 3 4 5 6 7 8 9 1 chunk +7 lines, -0 lines 0 comments Download
A chrome/test/data/extensions/network_delay/jfjjgilipffmpphcikcmjdaoomecgelc/1.0/background.html View 1 2 1 chunk +3 lines, -0 lines 0 comments Download
A chrome/test/data/extensions/network_delay/jfjjgilipffmpphcikcmjdaoomecgelc/1.0/manifest.json View 1 2 3 4 5 6 7 8 9 1 chunk +7 lines, -0 lines 0 comments Download
A chrome/test/data/extensions/network_delay/pjohnlkdpdolplmenneanegndccmdlpc/1.0/background.html View 1 2 1 chunk +3 lines, -0 lines 0 comments Download
A chrome/test/data/extensions/network_delay/pjohnlkdpdolplmenneanegndccmdlpc/1.0/manifest.json View 1 2 3 4 5 6 7 8 9 1 chunk +7 lines, -0 lines 0 comments Download
M content/browser/renderer_host/resource_queue.h View 1 2 3 4 5 6 7 8 9 2 chunks +5 lines, -7 lines 0 comments Download
M content/browser/renderer_host/resource_queue.cc View 1 2 3 4 5 6 7 8 9 1 chunk +13 lines, -9 lines 0 comments Download
M content/browser/renderer_host/resource_queue_unittest.cc View 1 2 3 4 5 6 7 8 9 4 chunks +28 lines, -10 lines 0 comments Download
M net/url_request/url_request.h View 1 2 3 4 5 6 7 8 9 2 chunks +2 lines, -0 lines 0 comments Download

Messages

Total messages: 21 (0 generated)
Pam (message me for reviews)
Still to come are unit tests (this CL) and hooking this into the notification system ...
9 years, 2 months ago (2011-10-07 14:42:51 UTC) #1
Pam (message me for reviews)
Also the permissions. Right now I've added a webRequest permission (so I can tell which ...
9 years, 2 months ago (2011-10-07 14:44:16 UTC) #2
battre
drive-by and not in-depth review (I was curious :-)) http://codereview.chromium.org/8205001/diff/8001/chrome/browser/extensions/network_delay_listener.cc File chrome/browser/extensions/network_delay_listener.cc (right): http://codereview.chromium.org/8205001/diff/8001/chrome/browser/extensions/network_delay_listener.cc#newcode123 chrome/browser/extensions/network_delay_listener.cc:123: ...
9 years, 2 months ago (2011-10-10 15:33:28 UTC) #3
Aaron Boodman
Nevermind what I suggested offline (about only blocking if there is someone listening), I think ...
9 years, 2 months ago (2011-10-10 22:59:29 UTC) #4
Matt Perry
http://codereview.chromium.org/8205001/diff/8001/chrome/browser/extensions/user_script_listener.cc File chrome/browser/extensions/user_script_listener.cc (left): http://codereview.chromium.org/8205001/diff/8001/chrome/browser/extensions/user_script_listener.cc#oldcode57 chrome/browser/extensions/user_script_listener.cc:57: delayed_request_ids_.push_front(request_id); I'm confused by this change. Before, we only ...
9 years, 2 months ago (2011-10-11 18:40:12 UTC) #5
Pam (message me for reviews)
All comments addressed, and unit tests added as promised. Please take another look. Thanks, - ...
9 years, 2 months ago (2011-10-12 14:28:11 UTC) #6
Pam (message me for reviews)
http://codereview.chromium.org/8205001/diff/23007/chrome/browser/extensions/network_delay_listener_unittest.cc File chrome/browser/extensions/network_delay_listener_unittest.cc (right): http://codereview.chromium.org/8205001/diff/23007/chrome/browser/extensions/network_delay_listener_unittest.cc#newcode58 chrome/browser/extensions/network_delay_listener_unittest.cc:58: explicit TestExtensionHost(const Extension* extension, Oops, I'll remove "explicit".
9 years, 2 months ago (2011-10-12 14:35:03 UTC) #7
Matt Perry
http://codereview.chromium.org/8205001/diff/8001/chrome/browser/extensions/user_script_listener.cc File chrome/browser/extensions/user_script_listener.cc (left): http://codereview.chromium.org/8205001/diff/8001/chrome/browser/extensions/user_script_listener.cc#oldcode57 chrome/browser/extensions/user_script_listener.cc:57: delayed_request_ids_.push_front(request_id); On 2011/10/12 14:28:12, Pam wrote: > On 2011/10/11 ...
9 years, 2 months ago (2011-10-12 17:13:55 UTC) #8
Pam (message me for reviews)
Aaron, The trybots look good, so please have another look. Thanks! - Pam
9 years, 2 months ago (2011-10-13 13:22:06 UTC) #9
Aaron Boodman
lgtm
9 years, 2 months ago (2011-10-13 18:53:03 UTC) #10
Pam (message me for reviews)
sky or jam: owner approval for content/browser/renderer_host/resource_queue* please jar: owner approval for net/url_request/url_request.h please Thanks, ...
9 years, 2 months ago (2011-10-14 07:50:44 UTC) #11
sky
John is a better reviewer for all this than I am. -Scott
9 years, 2 months ago (2011-10-14 15:01:05 UTC) #12
jam
content lgtm
9 years, 2 months ago (2011-10-14 16:24:10 UTC) #13
Pam (message me for reviews)
O Eric, Noble 'net/' Owner: Could you take a look at the 2-line change in ...
9 years, 2 months ago (2011-10-14 18:31:04 UTC) #14
willchan no longer on Chromium
lgtm
9 years, 2 months ago (2011-10-14 19:23:08 UTC) #15
eroman
lgtm for net/url_request
9 years, 2 months ago (2011-10-14 19:59:38 UTC) #16
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/pam@chromium.org/8205001/39002
9 years, 2 months ago (2011-10-14 20:55:31 UTC) #17
commit-bot: I haz the power
The commit queue went berserk retrying too often for a seemingly flaky test. Builder is ...
9 years, 2 months ago (2011-10-14 22:16:39 UTC) #18
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/pam@chromium.org/8205001/39002
9 years, 2 months ago (2011-10-14 22:20:21 UTC) #19
commit-bot: I haz the power
The commit queue went berserk retrying too often for a seemingly flaky test. Builder is ...
9 years, 2 months ago (2011-10-15 01:07:05 UTC) #20
jar (doing other things)
9 years, 2 months ago (2011-10-15 02:43:40 UTC) #21
As I mentioned... I had started to look at this earlier this morning... I only
had one comment so far... but it sounds like you got the review from others, so
I'll stop where I was.

http://codereview.chromium.org/8205001/diff/28020/chrome/browser/extensions/e...
File chrome/browser/extensions/extension_host.h (right):

http://codereview.chromium.org/8205001/diff/28020/chrome/browser/extensions/e...
chrome/browser/extensions/extension_host.h:199: ExtensionHost(const Extension*
extension, content::ViewType host_type);
Should you consider making this private, and then friending the tests?

Powered by Google App Engine
This is Rietveld 408576698