OLD | NEW |
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 <stddef.h> |
| 9 |
8 #include <map> | 10 #include <map> |
9 #include <string> | 11 #include <string> |
10 #include <vector> | 12 #include <vector> |
11 | 13 |
12 #include "base/callback.h" | 14 #include "base/callback.h" |
13 #include "base/gtest_prod_util.h" | 15 #include "base/gtest_prod_util.h" |
| 16 #include "base/macros.h" |
14 #include "base/memory/ref_counted.h" | 17 #include "base/memory/ref_counted.h" |
15 #include "base/memory/weak_ptr.h" | 18 #include "base/memory/weak_ptr.h" |
16 #include "components/content_settings/core/common/content_settings.h" | 19 #include "components/content_settings/core/common/content_settings.h" |
17 #include "content/public/browser/notification_observer.h" | 20 #include "content/public/browser/notification_observer.h" |
18 #include "content/public/browser/notification_registrar.h" | 21 #include "content/public/browser/notification_registrar.h" |
19 #include "content/public/browser/resource_request_info.h" | 22 #include "content/public/browser/resource_request_info.h" |
20 #include "content/public/browser/web_contents_observer.h" | 23 #include "content/public/browser/web_contents_observer.h" |
21 | 24 |
22 class HostContentSettingsMap; | 25 class HostContentSettingsMap; |
23 class DownloadRequestInfoBarDelegateAndroid; | 26 class DownloadRequestInfoBarDelegateAndroid; |
(...skipping 216 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
240 StateMap state_map_; | 243 StateMap state_map_; |
241 | 244 |
242 // Weak ptr factory used when |CanDownload| asks the delegate asynchronously | 245 // Weak ptr factory used when |CanDownload| asks the delegate asynchronously |
243 // about the download. | 246 // about the download. |
244 base::WeakPtrFactory<DownloadRequestLimiter> factory_; | 247 base::WeakPtrFactory<DownloadRequestLimiter> factory_; |
245 | 248 |
246 DISALLOW_COPY_AND_ASSIGN(DownloadRequestLimiter); | 249 DISALLOW_COPY_AND_ASSIGN(DownloadRequestLimiter); |
247 }; | 250 }; |
248 | 251 |
249 #endif // CHROME_BROWSER_DOWNLOAD_DOWNLOAD_REQUEST_LIMITER_H_ | 252 #endif // CHROME_BROWSER_DOWNLOAD_DOWNLOAD_REQUEST_LIMITER_H_ |
OLD | NEW |