summaryrefslogtreecommitdiffstats
path: root/chrome/browser/extensions
diff options
context:
space:
mode:
authorbattre@chromium.org <battre@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-10-16 05:21:30 +0000
committerbattre@chromium.org <battre@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-10-16 05:21:30 +0000
commitf38a76bf7a2023e675b27430d9aedf3782d8548f (patch)
tree2c8e86803695183b5ee6714784ed2f59a64e9cb6 /chrome/browser/extensions
parent906d66954099d64bc5575b554a49af7cdafb9d7d (diff)
downloadchromium_src-f38a76bf7a2023e675b27430d9aedf3782d8548f.zip
chromium_src-f38a76bf7a2023e675b27430d9aedf3782d8548f.tar.gz
chromium_src-f38a76bf7a2023e675b27430d9aedf3782d8548f.tar.bz2
Disable warning the user if a webRequest extension misbehaves
Disable warning the user if a webRequest extension misbehaves by delaying requests for too long as we do not have a sensible definition for "too long", yet. BUG=no TEST=no Review URL: http://codereview.chromium.org/8292006 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@105720 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/extensions')
-rw-r--r--chrome/browser/extensions/extension_webrequest_time_tracker.cc28
1 files changed, 17 insertions, 11 deletions
diff --git a/chrome/browser/extensions/extension_webrequest_time_tracker.cc b/chrome/browser/extensions/extension_webrequest_time_tracker.cc
index 50d3432..2ab3c46 100644
--- a/chrome/browser/extensions/extension_webrequest_time_tracker.cc
+++ b/chrome/browser/extensions/extension_webrequest_time_tracker.cc
@@ -73,10 +73,13 @@ void DefaultDelegate::NotifyExcessiveDelays(
size_t num_delayed_messages,
size_t total_num_messages,
const std::set<std::string>& extension_ids) {
- BrowserThread::PostTask(
- BrowserThread::UI,
- FROM_HERE,
- base::Bind(&NotifyNetworkDelaysOnUI, profile, extension_ids));
+ // TODO(battre) Enable warning the user if extensions misbehave as soon as we
+ // have data that allows us to decide on reasonable limits for triggering the
+ // warnings.
+ // BrowserThread::PostTask(
+ // BrowserThread::UI,
+ // FROM_HERE,
+ // base::Bind(&NotifyNetworkDelaysOnUI, profile, extension_ids));
}
void DefaultDelegate::NotifyModerateDelays(
@@ -84,10 +87,13 @@ void DefaultDelegate::NotifyModerateDelays(
size_t num_delayed_messages,
size_t total_num_messages,
const std::set<std::string>& extension_ids) {
- BrowserThread::PostTask(
- BrowserThread::UI,
- FROM_HERE,
- base::Bind(&NotifyNetworkDelaysOnUI, profile, extension_ids));
+ // TODO(battre) Enable warning the user if extensions misbehave as soon as we
+ // have data that allows us to decide on reasonable limits for triggering the
+ // warnings.
+ // BrowserThread::PostTask(
+ // BrowserThread::UI,
+ // FROM_HERE,
+ // base::Bind(&NotifyNetworkDelaysOnUI, profile, extension_ids));
}
} // namespace
@@ -179,7 +185,7 @@ void ExtensionWebRequestTimeTracker::Analyze(int64 request_id) {
double percentage =
log.block_duration.InMillisecondsF() /
log.request_duration.InMillisecondsF();
- LOG(ERROR) << "WR percent " << request_id << ": " << log.url << ": " <<
+ VLOG(1) << "WR percent " << request_id << ": " << log.url << ": " <<
log.block_duration.InMilliseconds() << "/" <<
log.request_duration.InMilliseconds() << " = " << percentage;
@@ -188,7 +194,7 @@ void ExtensionWebRequestTimeTracker::Analyze(int64 request_id) {
if (percentage > kThresholdExcessiveDelay) {
excessive_delays_.insert(request_id);
if (excessive_delays_.size() > kNumExcessiveDelaysBeforeWarning) {
- LOG(ERROR) << "WR excessive delays:" << excessive_delays_.size();
+ VLOG(1) << "WR excessive delays:" << excessive_delays_.size();
if (delegate_.get()) {
delegate_->NotifyExcessiveDelays(log.profile,
excessive_delays_.size(),
@@ -200,7 +206,7 @@ void ExtensionWebRequestTimeTracker::Analyze(int64 request_id) {
moderate_delays_.insert(request_id);
if (moderate_delays_.size() + excessive_delays_.size() >
kNumModerateDelaysBeforeWarning) {
- LOG(ERROR) << "WR moderate delays:" << moderate_delays_.size();
+ VLOG(1) << "WR moderate delays:" << moderate_delays_.size();
if (delegate_.get()) {
delegate_->NotifyModerateDelays(
log.profile,