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

Side by Side Diff: chrome/browser/download/download_request_limiter_observer.cc

Issue 10412061: Fix crashes in DownloadRequestLimiter when extension popups/bubbles initiate downloads automatically (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: merge Created 8 years, 6 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
(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 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698