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

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

Issue 1903103002: Remove some dead code for permission bubbles. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix rebase error Created 4 years, 8 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 "chrome/grit/generated_resources.h" 7 #include "chrome/grit/generated_resources.h"
8 #include "content/public/browser/web_contents.h" 8 #include "content/public/browser/web_contents.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 const content::WebContents* web_contents = host_->web_contents(); 15 const content::WebContents* web_contents = host_->web_contents();
16 DCHECK(web_contents); 16 DCHECK(web_contents);
17 request_origin_ = web_contents->GetURL().GetOrigin(); 17 request_origin_ = web_contents->GetURL().GetOrigin();
18 } 18 }
19 19
20 DownloadPermissionRequest::~DownloadPermissionRequest() {} 20 DownloadPermissionRequest::~DownloadPermissionRequest() {}
21 21
22 int DownloadPermissionRequest::GetIconId() const { 22 int DownloadPermissionRequest::GetIconId() const {
23 return IDR_INFOBAR_MULTIPLE_DOWNLOADS; 23 return IDR_INFOBAR_MULTIPLE_DOWNLOADS;
24 } 24 }
25 25
26 base::string16 DownloadPermissionRequest::GetMessageText() const {
27 return l10n_util::GetStringUTF16(IDS_MULTI_DOWNLOAD_WARNING);
28 }
29
30 base::string16 DownloadPermissionRequest::GetMessageTextFragment() const { 26 base::string16 DownloadPermissionRequest::GetMessageTextFragment() const {
31 return l10n_util::GetStringUTF16(IDS_MULTI_DOWNLOAD_PERMISSION_FRAGMENT); 27 return l10n_util::GetStringUTF16(IDS_MULTI_DOWNLOAD_PERMISSION_FRAGMENT);
32 } 28 }
33 29
34 GURL DownloadPermissionRequest::GetOrigin() const { 30 GURL DownloadPermissionRequest::GetOrigin() const {
35 return request_origin_; 31 return request_origin_;
36 } 32 }
37 33
38 void DownloadPermissionRequest::PermissionGranted() { 34 void DownloadPermissionRequest::PermissionGranted() {
39 if (host_) { 35 if (host_) {
(...skipping 17 matching lines...) Expand all
57 } 53 }
58 54
59 void DownloadPermissionRequest::RequestFinished() { 55 void DownloadPermissionRequest::RequestFinished() {
60 delete this; 56 delete this;
61 } 57 }
62 58
63 PermissionBubbleType DownloadPermissionRequest::GetPermissionBubbleType() 59 PermissionBubbleType DownloadPermissionRequest::GetPermissionBubbleType()
64 const { 60 const {
65 return PermissionBubbleType::DOWNLOAD; 61 return PermissionBubbleType::DOWNLOAD;
66 } 62 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698