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

Unified Diff: chrome/browser/extensions/user_script_listener.cc

Issue 8205001: (Owner approval for) Delay network requests on startup if any webRequest ... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 9 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: chrome/browser/extensions/user_script_listener.cc
===================================================================
--- chrome/browser/extensions/user_script_listener.cc (revision 104705)
+++ chrome/browser/extensions/user_script_listener.cc (working copy)
@@ -10,7 +10,6 @@
#include "chrome/common/extensions/extension.h"
#include "chrome/common/extensions/url_pattern.h"
#include "content/browser/browser_thread.h"
-#include "content/browser/renderer_host/global_request_id.h"
#include "content/browser/renderer_host/resource_dispatcher_host_request_info.h"
#include "content/common/notification_service.h"
#include "net/url_request/url_request.h"
@@ -54,7 +53,6 @@
if ((*it).MatchesURL(request->url())) {
// One of the user scripts wants to inject into this request, but the
// script isn't ready yet. Delay the request.
- delayed_request_ids_.push_front(request_id);
Matt Perry 2011/10/11 18:40:12 I'm confused by this change. Before, we only block
Pam (message me for reviews) 2011/10/12 14:28:12 We still only block requests that match a pattern
Matt Perry 2011/10/12 17:13:55 Of course, good point! My mistake.
return true;
}
}
@@ -80,13 +78,8 @@
user_scripts_ready_ = true;
if (resource_queue_) {
- for (DelayedRequests::iterator it = delayed_request_ids_.begin();
- it != delayed_request_ids_.end(); ++it) {
- resource_queue_->StartDelayedRequest(this, *it);
- }
+ resource_queue_->StartDelayedRequests(this);
}
-
- delayed_request_ids_.clear();
}
void UserScriptListener::AppendNewURLPatterns(const URLPatterns& new_patterns) {

Powered by Google App Engine
This is Rietveld 408576698