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

Unified Diff: chrome/browser/download/download_request_limiter_observer.cc

Issue 7660007: Factor out dependncy on download throttling from core download code. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 9 years, 4 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/download/download_request_limiter_observer.cc
===================================================================
--- chrome/browser/download/download_request_limiter_observer.cc (revision 0)
+++ chrome/browser/download/download_request_limiter_observer.cc (revision 0)
@@ -0,0 +1,22 @@
+// Copyright (c) 2011 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#include "chrome/browser/download/download_request_limiter_observer.h"
+
+#include "chrome/browser/browser_process.h"
+#include "chrome/browser/download/download_request_limiter.h"
+
+DownloadRequestLimiterObserver::DownloadRequestLimiterObserver(
+ TabContents* tab_contents)
+ : TabContentsObserver(tab_contents) {
+}
+
+DownloadRequestLimiterObserver::~DownloadRequestLimiterObserver() {
+}
+
+void DownloadRequestLimiterObserver::DidGetUserGesture() {
+ if (!g_browser_process->download_request_limiter())
+ return; // NULL in unitests.
+ g_browser_process->download_request_limiter()->OnUserGesture(tab_contents());
+}
Property changes on: chrome\browser\download\download_request_limiter_observer.cc
___________________________________________________________________
Added: svn:eol-style
+ LF

Powered by Google App Engine
This is Rietveld 408576698