| 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 using content::WebContents; | |
| 11 | |
| 12 DownloadRequestLimiterObserver::DownloadRequestLimiterObserver( | |
| 13 WebContents* web_contents) | |
| 14 : content::WebContentsObserver(web_contents) { | |
| 15 } | |
| 16 | |
| 17 DownloadRequestLimiterObserver::~DownloadRequestLimiterObserver() { | |
| 18 } | |
| 19 | |
| 20 void DownloadRequestLimiterObserver::DidGetUserGesture() { | |
| 21 if (!g_browser_process->download_request_limiter()) | |
| 22 return; // NULL in unitests. | |
| 23 g_browser_process->download_request_limiter()->OnUserGesture(web_contents()); | |
| 24 } | |
| OLD | NEW |