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

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

Issue 454253002: Location chooser (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Swapping to address InfoBar currying callback case Created 6 years, 4 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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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_permission_request.h" 5 #include "chrome/browser/download/download_permission_request.h"
6 6
7 #include "content/public/browser/web_contents.h" 7 #include "content/public/browser/web_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.h"
10 #include "ui/base/l10n/l10n_util.h" 10 #include "ui/base/l10n/l10n_util.h"
11 11
12 DownloadPermissionRequest::DownloadPermissionRequest( 12 DownloadPermissionRequest::DownloadPermissionRequest(
13 base::WeakPtr<DownloadRequestLimiter::TabDownloadState> host) 13 base::WeakPtr<DownloadRequestLimiter::TabDownloadState> host)
14 : host_(host) {} 14 : host_(host) {}
15 15
16 DownloadPermissionRequest::~DownloadPermissionRequest() {} 16 DownloadPermissionRequest::~DownloadPermissionRequest() {}
17 17
18 PermissionBubbleRequest::Type DownloadPermissionRequest::GetType() const {
19 return PermissionBubbleRequest::Type::kDownload;
20 }
21
18 int DownloadPermissionRequest::GetIconID() const { 22 int DownloadPermissionRequest::GetIconID() const {
19 return IDR_INFOBAR_MULTIPLE_DOWNLOADS; 23 return IDR_INFOBAR_MULTIPLE_DOWNLOADS;
20 } 24 }
21 25
22 base::string16 DownloadPermissionRequest::GetMessageText() const { 26 base::string16 DownloadPermissionRequest::GetMessageText() const {
23 return l10n_util::GetStringUTF16(IDS_MULTI_DOWNLOAD_WARNING); 27 return l10n_util::GetStringUTF16(IDS_MULTI_DOWNLOAD_WARNING);
24 } 28 }
25 29
26 base::string16 DownloadPermissionRequest::GetMessageTextFragment() const { 30 base::string16 DownloadPermissionRequest::GetMessageTextFragment() const {
27 return l10n_util::GetStringUTF16(IDS_MULTI_DOWNLOAD_PERMISSION_FRAGMENT); 31 return l10n_util::GetStringUTF16(IDS_MULTI_DOWNLOAD_PERMISSION_FRAGMENT);
(...skipping 28 matching lines...) Expand all
56 } 60 }
57 61
58 void DownloadPermissionRequest::Cancelled() { 62 void DownloadPermissionRequest::Cancelled() {
59 // TODO(gbillock): There's currently no suitable method for telling the host 63 // TODO(gbillock): There's currently no suitable method for telling the host
60 // that a request is cancelled. 64 // that a request is cancelled.
61 } 65 }
62 66
63 void DownloadPermissionRequest::RequestFinished() { 67 void DownloadPermissionRequest::RequestFinished() {
64 delete this; 68 delete this;
65 } 69 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698