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

Side by Side Diff: chrome/browser/download/download_request_limiter.h

Issue 257153003: We have a problem in the process on destroying WebContentsImpl because (Closed) Base URL: https://git.chromium.org/chromium/src.git@master
Patch Set: Rebased onto origin/master again, resolved conflicts Created 6 years, 7 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
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef CHROME_BROWSER_DOWNLOAD_DOWNLOAD_REQUEST_LIMITER_H_ 5 #ifndef CHROME_BROWSER_DOWNLOAD_DOWNLOAD_REQUEST_LIMITER_H_
6 #define CHROME_BROWSER_DOWNLOAD_DOWNLOAD_REQUEST_LIMITER_H_ 6 #define CHROME_BROWSER_DOWNLOAD_DOWNLOAD_REQUEST_LIMITER_H_
7 7
8 #include <map> 8 #include <map>
9 #include <string> 9 #include <string>
10 #include <vector> 10 #include <vector>
(...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after
105 content::WebContents* web_contents() const { 105 content::WebContents* web_contents() const {
106 return content::WebContentsObserver::web_contents(); 106 return content::WebContentsObserver::web_contents();
107 } 107 }
108 108
109 // content::WebContentsObserver overrides. 109 // content::WebContentsObserver overrides.
110 virtual void AboutToNavigateRenderView( 110 virtual void AboutToNavigateRenderView(
111 content::RenderViewHost* render_view_host) OVERRIDE; 111 content::RenderViewHost* render_view_host) OVERRIDE;
112 // Invoked when a user gesture occurs (mouse click, enter or space). This 112 // Invoked when a user gesture occurs (mouse click, enter or space). This
113 // may result in invoking Remove on DownloadRequestLimiter. 113 // may result in invoking Remove on DownloadRequestLimiter.
114 virtual void DidGetUserGesture() OVERRIDE; 114 virtual void DidGetUserGesture() OVERRIDE;
115 virtual void WebContentsDestroyed( 115 virtual void WebContentsDestroyed() OVERRIDE;
116 content::WebContents* web_contents) OVERRIDE;
117 116
118 // Asks the user if they really want to allow the download. 117 // Asks the user if they really want to allow the download.
119 // See description above CanDownloadOnIOThread for details on lifetime of 118 // See description above CanDownloadOnIOThread for details on lifetime of
120 // callback. 119 // callback.
121 void PromptUserForDownload( 120 void PromptUserForDownload(
122 const DownloadRequestLimiter::Callback& callback); 121 const DownloadRequestLimiter::Callback& callback);
123 122
124 // Invoked from DownloadRequestDialogDelegate. Notifies the delegates and 123 // Invoked from DownloadRequestDialogDelegate. Notifies the delegates and
125 // changes the status appropriately. Virtual for testing. 124 // changes the status appropriately. Virtual for testing.
126 virtual void Cancel(); 125 virtual void Cancel();
(...skipping 131 matching lines...) Expand 10 before | Expand all | Expand 10 after
258 StateMap state_map_; 257 StateMap state_map_;
259 258
260 // Weak ptr factory used when |CanDownload| asks the delegate asynchronously 259 // Weak ptr factory used when |CanDownload| asks the delegate asynchronously
261 // about the download. 260 // about the download.
262 base::WeakPtrFactory<DownloadRequestLimiter> factory_; 261 base::WeakPtrFactory<DownloadRequestLimiter> factory_;
263 262
264 DISALLOW_COPY_AND_ASSIGN(DownloadRequestLimiter); 263 DISALLOW_COPY_AND_ASSIGN(DownloadRequestLimiter);
265 }; 264 };
266 265
267 #endif // CHROME_BROWSER_DOWNLOAD_DOWNLOAD_REQUEST_LIMITER_H_ 266 #endif // CHROME_BROWSER_DOWNLOAD_DOWNLOAD_REQUEST_LIMITER_H_
OLDNEW
« no previous file with comments | « chrome/browser/chromeos/file_manager/app_installer.cc ('k') | chrome/browser/download/download_request_limiter.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698