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

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

Issue 9621007: Add new danger type for uncommon or unknown downloads. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: " Created 8 years, 9 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/singleton.h" 7 #include "base/memory/singleton.h"
8 #include "base/string_piece.h" 8 #include "base/string_piece.h"
9 #include "base/threading/thread.h" 9 #include "base/threading/thread.h"
10 #include "base/values.h" 10 #include "base/values.h"
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
48 source->AddLocalizedString("status_paused", IDS_DOWNLOAD_PROGRESS_PAUSED); 48 source->AddLocalizedString("status_paused", IDS_DOWNLOAD_PROGRESS_PAUSED);
49 source->AddLocalizedString("status_interrupted", 49 source->AddLocalizedString("status_interrupted",
50 IDS_DOWNLOAD_PROGRESS_INTERRUPTED); 50 IDS_DOWNLOAD_PROGRESS_INTERRUPTED);
51 51
52 // Dangerous file. 52 // Dangerous file.
53 source->AddLocalizedString("danger_file_desc", IDS_PROMPT_DANGEROUS_DOWNLOAD); 53 source->AddLocalizedString("danger_file_desc", IDS_PROMPT_DANGEROUS_DOWNLOAD);
54 source->AddLocalizedString("danger_url_desc", 54 source->AddLocalizedString("danger_url_desc",
55 IDS_PROMPT_MALICIOUS_DOWNLOAD_URL); 55 IDS_PROMPT_MALICIOUS_DOWNLOAD_URL);
56 source->AddLocalizedString("danger_content_desc", 56 source->AddLocalizedString("danger_content_desc",
57 IDS_PROMPT_MALICIOUS_DOWNLOAD_CONTENT); 57 IDS_PROMPT_MALICIOUS_DOWNLOAD_CONTENT);
58 source->AddLocalizedString("danger_uncommon_desc",
59 IDS_PROMPT_UNCOMMON_DOWNLOAD_CONTENT);
58 source->AddLocalizedString("danger_save", IDS_CONFIRM_DOWNLOAD); 60 source->AddLocalizedString("danger_save", IDS_CONFIRM_DOWNLOAD);
59 source->AddLocalizedString("danger_discard", IDS_DISCARD_DOWNLOAD); 61 source->AddLocalizedString("danger_discard", IDS_DISCARD_DOWNLOAD);
60 62
61 // Controls. 63 // Controls.
62 source->AddLocalizedString("control_pause", IDS_DOWNLOAD_LINK_PAUSE); 64 source->AddLocalizedString("control_pause", IDS_DOWNLOAD_LINK_PAUSE);
63 if (browser_defaults::kDownloadPageHasShowInFolder) { 65 if (browser_defaults::kDownloadPageHasShowInFolder) {
64 source->AddLocalizedString("control_showinfolder", IDS_DOWNLOAD_LINK_SHOW); 66 source->AddLocalizedString("control_showinfolder", IDS_DOWNLOAD_LINK_SHOW);
65 } 67 }
66 source->AddLocalizedString("control_retry", IDS_DOWNLOAD_LINK_RETRY); 68 source->AddLocalizedString("control_retry", IDS_DOWNLOAD_LINK_RETRY);
67 source->AddLocalizedString("control_cancel", IDS_DOWNLOAD_LINK_CANCEL); 69 source->AddLocalizedString("control_cancel", IDS_DOWNLOAD_LINK_CANCEL);
(...skipping 28 matching lines...) Expand all
96 // Set up the chrome://downloads/ source. 98 // Set up the chrome://downloads/ source.
97 profile->GetChromeURLDataManager()->AddDataSource( 99 profile->GetChromeURLDataManager()->AddDataSource(
98 CreateDownloadsUIHTMLSource()); 100 CreateDownloadsUIHTMLSource());
99 } 101 }
100 102
101 // static 103 // static
102 RefCountedMemory* DownloadsUI::GetFaviconResourceBytes() { 104 RefCountedMemory* DownloadsUI::GetFaviconResourceBytes() {
103 return ResourceBundle::GetSharedInstance(). 105 return ResourceBundle::GetSharedInstance().
104 LoadDataResourceBytes(IDR_DOWNLOADS_FAVICON); 106 LoadDataResourceBytes(IDR_DOWNLOADS_FAVICON);
105 } 107 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/webui/chromeos/active_downloads_ui.cc ('k') | chrome/common/extensions/api/experimental.downloads.json » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698