| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 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 | 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 #include "chrome/browser/download/download_request_infobar_delegate.h" | 5 #include "chrome/browser/download/download_request_infobar_delegate.h" |
| 6 | 6 |
| 7 #include "content/browser/tab_contents/tab_contents.h" | 7 #include "content/browser/tab_contents/tab_contents.h" |
| 8 #include "grit/generated_resources.h" | 8 #include "grit/generated_resources.h" |
| 9 #include "grit/theme_resources.h" | 9 #include "grit/theme_resources_standard.h" |
| 10 #include "ui/base/l10n/l10n_util.h" | 10 #include "ui/base/l10n/l10n_util.h" |
| 11 #include "ui/base/resource/resource_bundle.h" | 11 #include "ui/base/resource/resource_bundle.h" |
| 12 | 12 |
| 13 DownloadRequestInfoBarDelegate::DownloadRequestInfoBarDelegate( | 13 DownloadRequestInfoBarDelegate::DownloadRequestInfoBarDelegate( |
| 14 TabContents* tab, | 14 TabContents* tab, |
| 15 DownloadRequestLimiter::TabDownloadState* host) | 15 DownloadRequestLimiter::TabDownloadState* host) |
| 16 : ConfirmInfoBarDelegate(tab), | 16 : ConfirmInfoBarDelegate(tab), |
| 17 host_(host) { | 17 host_(host) { |
| 18 } | 18 } |
| 19 | 19 |
| (...skipping 22 matching lines...) Expand all Loading... |
| 42 } | 42 } |
| 43 | 43 |
| 44 bool DownloadRequestInfoBarDelegate::Accept() { | 44 bool DownloadRequestInfoBarDelegate::Accept() { |
| 45 if (host_) { | 45 if (host_) { |
| 46 // Accept() call will nullify host_ if no further prompts are required. | 46 // Accept() call will nullify host_ if no further prompts are required. |
| 47 host_->Accept(); | 47 host_->Accept(); |
| 48 } | 48 } |
| 49 | 49 |
| 50 return !host_; | 50 return !host_; |
| 51 } | 51 } |
| OLD | NEW |