OLD | NEW |
(Empty) | |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #include "chrome/browser/download/download_request_limiter_observer.h" |
| 6 |
| 7 #include "chrome/browser/browser_process.h" |
| 8 #include "chrome/browser/download/download_request_limiter.h" |
| 9 |
| 10 DownloadRequestLimiterObserver::DownloadRequestLimiterObserver( |
| 11 TabContents* tab_contents) |
| 12 : TabContentsObserver(tab_contents) { |
| 13 } |
| 14 |
| 15 DownloadRequestLimiterObserver::~DownloadRequestLimiterObserver() { |
| 16 } |
| 17 |
| 18 void DownloadRequestLimiterObserver::DidGetUserGesture() { |
| 19 if (!g_browser_process->download_request_limiter()) |
| 20 return; // NULL in unitests. |
| 21 g_browser_process->download_request_limiter()->OnUserGesture(tab_contents()); |
| 22 } |
OLD | NEW |