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

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

Issue 12087095: Sync csd.proto with server-side version. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: missing comma Created 7 years, 10 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 | Annotate | Revision Log
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 #include "chrome/browser/download/download_danger_prompt.h" 5 #include "chrome/browser/download/download_danger_prompt.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "chrome/browser/download/chrome_download_manager_delegate.h" 8 #include "chrome/browser/download/chrome_download_manager_delegate.h"
9 #include "chrome/browser/ui/tab_modal_confirm_dialog.h" 9 #include "chrome/browser/ui/tab_modal_confirm_dialog.h"
10 #include "chrome/browser/ui/tab_modal_confirm_dialog_delegate.h" 10 #include "chrome/browser/ui/tab_modal_confirm_dialog_delegate.h"
(...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after
111 if (!show_context_) 111 if (!show_context_)
112 return l10n_util::GetStringUTF16( 112 return l10n_util::GetStringUTF16(
113 IDS_PROMPT_CONFIRM_KEEP_DANGEROUS_DOWNLOAD); 113 IDS_PROMPT_CONFIRM_KEEP_DANGEROUS_DOWNLOAD);
114 switch (download_->GetDangerType()) { 114 switch (download_->GetDangerType()) {
115 case content::DOWNLOAD_DANGER_TYPE_DANGEROUS_FILE: 115 case content::DOWNLOAD_DANGER_TYPE_DANGEROUS_FILE:
116 return l10n_util::GetStringFUTF16( 116 return l10n_util::GetStringFUTF16(
117 IDS_PROMPT_DANGEROUS_DOWNLOAD, 117 IDS_PROMPT_DANGEROUS_DOWNLOAD,
118 download_->GetFileNameToReportUser().LossyDisplayName()); 118 download_->GetFileNameToReportUser().LossyDisplayName());
119 case content::DOWNLOAD_DANGER_TYPE_DANGEROUS_URL: // Fall through 119 case content::DOWNLOAD_DANGER_TYPE_DANGEROUS_URL: // Fall through
120 case content::DOWNLOAD_DANGER_TYPE_DANGEROUS_CONTENT: 120 case content::DOWNLOAD_DANGER_TYPE_DANGEROUS_CONTENT:
121 case content::DOWNLOAD_DANGER_TYPE_DANGEROUS_HOST:
121 return l10n_util::GetStringFUTF16( 122 return l10n_util::GetStringFUTF16(
122 IDS_PROMPT_MALICIOUS_DOWNLOAD_CONTENT, 123 IDS_PROMPT_MALICIOUS_DOWNLOAD_CONTENT,
123 download_->GetFileNameToReportUser().LossyDisplayName()); 124 download_->GetFileNameToReportUser().LossyDisplayName());
124 case content::DOWNLOAD_DANGER_TYPE_UNCOMMON_CONTENT: 125 case content::DOWNLOAD_DANGER_TYPE_UNCOMMON_CONTENT:
125 return l10n_util::GetStringFUTF16( 126 return l10n_util::GetStringFUTF16(
126 IDS_PROMPT_UNCOMMON_DOWNLOAD_CONTENT, 127 IDS_PROMPT_UNCOMMON_DOWNLOAD_CONTENT,
127 download_->GetFileNameToReportUser().LossyDisplayName()); 128 download_->GetFileNameToReportUser().LossyDisplayName());
128 default: 129 default:
129 NOTREACHED(); 130 NOTREACHED();
130 return string16(); 131 return string16();
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
171 content::WebContents* web_contents, 172 content::WebContents* web_contents,
172 bool show_context, 173 bool show_context,
173 const base::Closure& accepted, 174 const base::Closure& accepted,
174 const base::Closure& canceled) { 175 const base::Closure& canceled) {
175 DownloadDangerPromptImpl* prompt = new DownloadDangerPromptImpl( 176 DownloadDangerPromptImpl* prompt = new DownloadDangerPromptImpl(
176 item, web_contents, show_context, accepted, canceled); 177 item, web_contents, show_context, accepted, canceled);
177 // |prompt| will be deleted when the dialog is done. 178 // |prompt| will be deleted when the dialog is done.
178 TabModalConfirmDialog::Create(prompt, web_contents); 179 TabModalConfirmDialog::Create(prompt, web_contents);
179 return prompt; 180 return prompt;
180 } 181 }
OLDNEW
« no previous file with comments | « chrome/browser/download/chrome_download_manager_delegate.cc ('k') | chrome/browser/download/download_item_model.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698