OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
42 | 42 |
43 // Status. | 43 // Status. |
44 source->AddLocalizedString("status_cancelled", IDS_DOWNLOAD_TAB_CANCELED); | 44 source->AddLocalizedString("status_cancelled", IDS_DOWNLOAD_TAB_CANCELED); |
45 source->AddLocalizedString("status_removed", IDS_DOWNLOAD_FILE_REMOVED); | 45 source->AddLocalizedString("status_removed", IDS_DOWNLOAD_FILE_REMOVED); |
46 source->AddLocalizedString("status_paused", IDS_DOWNLOAD_PROGRESS_PAUSED); | 46 source->AddLocalizedString("status_paused", IDS_DOWNLOAD_PROGRESS_PAUSED); |
47 source->AddLocalizedString("status_interrupted", | 47 source->AddLocalizedString("status_interrupted", |
48 IDS_DOWNLOAD_PROGRESS_INTERRUPTED); | 48 IDS_DOWNLOAD_PROGRESS_INTERRUPTED); |
49 | 49 |
50 // Dangerous file. | 50 // Dangerous file. |
51 source->AddLocalizedString("danger_file_desc", IDS_PROMPT_DANGEROUS_DOWNLOAD); | 51 source->AddLocalizedString("danger_file_desc", IDS_PROMPT_DANGEROUS_DOWNLOAD); |
52 source->AddLocalizedString("danger_url_desc", IDS_PROMPT_UNSAFE_DOWNLOAD_URL); | 52 source->AddLocalizedString("danger_url_desc", |
| 53 IDS_PROMPT_MALICIOUS_DOWNLOAD_URL); |
| 54 source->AddLocalizedString("danger_content_desc", |
| 55 IDS_PROMPT_MALICIOUS_DOWNLOAD_CONTENT); |
53 source->AddLocalizedString("danger_save", IDS_CONFIRM_DOWNLOAD); | 56 source->AddLocalizedString("danger_save", IDS_CONFIRM_DOWNLOAD); |
54 source->AddLocalizedString("danger_discard", IDS_DISCARD_DOWNLOAD); | 57 source->AddLocalizedString("danger_discard", IDS_DISCARD_DOWNLOAD); |
55 | 58 |
56 // Controls. | 59 // Controls. |
57 source->AddLocalizedString("control_pause", IDS_DOWNLOAD_LINK_PAUSE); | 60 source->AddLocalizedString("control_pause", IDS_DOWNLOAD_LINK_PAUSE); |
58 if (browser_defaults::kDownloadPageHasShowInFolder) { | 61 if (browser_defaults::kDownloadPageHasShowInFolder) { |
59 source->AddLocalizedString("control_showinfolder", IDS_DOWNLOAD_LINK_SHOW); | 62 source->AddLocalizedString("control_showinfolder", IDS_DOWNLOAD_LINK_SHOW); |
60 } | 63 } |
61 source->AddLocalizedString("control_retry", IDS_DOWNLOAD_LINK_RETRY); | 64 source->AddLocalizedString("control_retry", IDS_DOWNLOAD_LINK_RETRY); |
62 source->AddLocalizedString("control_cancel", IDS_DOWNLOAD_LINK_CANCEL); | 65 source->AddLocalizedString("control_cancel", IDS_DOWNLOAD_LINK_CANCEL); |
(...skipping 29 matching lines...) Expand all Loading... |
92 Profile* profile = Profile::FromBrowserContext(contents->browser_context()); | 95 Profile* profile = Profile::FromBrowserContext(contents->browser_context()); |
93 profile->GetChromeURLDataManager()->AddDataSource( | 96 profile->GetChromeURLDataManager()->AddDataSource( |
94 CreateDownloadsUIHTMLSource()); | 97 CreateDownloadsUIHTMLSource()); |
95 } | 98 } |
96 | 99 |
97 // static | 100 // static |
98 RefCountedMemory* DownloadsUI::GetFaviconResourceBytes() { | 101 RefCountedMemory* DownloadsUI::GetFaviconResourceBytes() { |
99 return ResourceBundle::GetSharedInstance(). | 102 return ResourceBundle::GetSharedInstance(). |
100 LoadDataResourceBytes(IDR_DOWNLOADS_FAVICON); | 103 LoadDataResourceBytes(IDR_DOWNLOADS_FAVICON); |
101 } | 104 } |
OLD | NEW |