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

Side by Side Diff: chrome/browser/ui/webui/downloads_ui.cc

Issue 19863005: Warn users about potentially unwanted downloads. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Add a "Learn more" URL for unwanted downloads. Created 7 years, 5 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/ui/webui/downloads_ui.h" 5 #include "chrome/browser/ui/webui/downloads_ui.h"
6 6
7 #include "base/memory/ref_counted_memory.h" 7 #include "base/memory/ref_counted_memory.h"
8 #include "base/memory/singleton.h" 8 #include "base/memory/singleton.h"
9 #include "base/prefs/pref_service.h" 9 #include "base/prefs/pref_service.h"
10 #include "base/strings/string_piece.h" 10 #include "base/strings/string_piece.h"
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
52 source->AddLocalizedString("status_paused", IDS_DOWNLOAD_PROGRESS_PAUSED); 52 source->AddLocalizedString("status_paused", IDS_DOWNLOAD_PROGRESS_PAUSED);
53 53
54 // Dangerous file. 54 // Dangerous file.
55 source->AddLocalizedString("danger_file_desc", IDS_PROMPT_DANGEROUS_DOWNLOAD); 55 source->AddLocalizedString("danger_file_desc", IDS_PROMPT_DANGEROUS_DOWNLOAD);
56 source->AddLocalizedString("danger_url_desc", 56 source->AddLocalizedString("danger_url_desc",
57 IDS_PROMPT_MALICIOUS_DOWNLOAD_URL); 57 IDS_PROMPT_MALICIOUS_DOWNLOAD_URL);
58 source->AddLocalizedString("danger_content_desc", 58 source->AddLocalizedString("danger_content_desc",
59 IDS_PROMPT_MALICIOUS_DOWNLOAD_CONTENT); 59 IDS_PROMPT_MALICIOUS_DOWNLOAD_CONTENT);
60 source->AddLocalizedString("danger_uncommon_desc", 60 source->AddLocalizedString("danger_uncommon_desc",
61 IDS_PROMPT_UNCOMMON_DOWNLOAD_CONTENT); 61 IDS_PROMPT_UNCOMMON_DOWNLOAD_CONTENT);
62 source->AddLocalizedString("danger_potentially_unwanted_desc",
63 IDS_PROMPT_POTENTIALLY_UNWANTED_DOWNLOAD);
62 source->AddLocalizedString("danger_save", IDS_CONFIRM_DOWNLOAD); 64 source->AddLocalizedString("danger_save", IDS_CONFIRM_DOWNLOAD);
63 source->AddLocalizedString("danger_discard", IDS_DISCARD_DOWNLOAD); 65 source->AddLocalizedString("danger_discard", IDS_DISCARD_DOWNLOAD);
64 66
65 // Controls. 67 // Controls.
66 source->AddLocalizedString("control_pause", IDS_DOWNLOAD_LINK_PAUSE); 68 source->AddLocalizedString("control_pause", IDS_DOWNLOAD_LINK_PAUSE);
67 if (browser_defaults::kDownloadPageHasShowInFolder) { 69 if (browser_defaults::kDownloadPageHasShowInFolder) {
68 source->AddLocalizedString("control_showinfolder", IDS_DOWNLOAD_LINK_SHOW); 70 source->AddLocalizedString("control_showinfolder", IDS_DOWNLOAD_LINK_SHOW);
69 } 71 }
70 source->AddLocalizedString("control_retry", IDS_DOWNLOAD_LINK_RETRY); 72 source->AddLocalizedString("control_retry", IDS_DOWNLOAD_LINK_RETRY);
71 source->AddLocalizedString("control_cancel", IDS_DOWNLOAD_LINK_CANCEL); 73 source->AddLocalizedString("control_cancel", IDS_DOWNLOAD_LINK_CANCEL);
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
109 content::URLDataSource::Add(profile, theme); 111 content::URLDataSource::Add(profile, theme);
110 #endif 112 #endif
111 } 113 }
112 114
113 // static 115 // static
114 base::RefCountedMemory* DownloadsUI::GetFaviconResourceBytes( 116 base::RefCountedMemory* DownloadsUI::GetFaviconResourceBytes(
115 ui::ScaleFactor scale_factor) { 117 ui::ScaleFactor scale_factor) {
116 return ResourceBundle::GetSharedInstance(). 118 return ResourceBundle::GetSharedInstance().
117 LoadDataResourceBytesForScale(IDR_DOWNLOADS_FAVICON, scale_factor); 119 LoadDataResourceBytesForScale(IDR_DOWNLOADS_FAVICON, scale_factor);
118 } 120 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/webui/downloads_dom_handler.cc ('k') | chrome/common/extensions/api/downloads.idl » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698