| 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 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 67 localized_strings.SetString("searchresultsfor", | 67 localized_strings.SetString("searchresultsfor", |
| 68 l10n_util::GetStringUTF16(IDS_DOWNLOAD_SEARCHRESULTSFOR)); | 68 l10n_util::GetStringUTF16(IDS_DOWNLOAD_SEARCHRESULTSFOR)); |
| 69 localized_strings.SetString("downloads", | 69 localized_strings.SetString("downloads", |
| 70 l10n_util::GetStringUTF16(IDS_DOWNLOAD_TITLE)); | 70 l10n_util::GetStringUTF16(IDS_DOWNLOAD_TITLE)); |
| 71 localized_strings.SetString("clear_all", | 71 localized_strings.SetString("clear_all", |
| 72 l10n_util::GetStringUTF16(IDS_DOWNLOAD_LINK_CLEAR_ALL)); | 72 l10n_util::GetStringUTF16(IDS_DOWNLOAD_LINK_CLEAR_ALL)); |
| 73 | 73 |
| 74 // Status. | 74 // Status. |
| 75 localized_strings.SetString("status_cancelled", | 75 localized_strings.SetString("status_cancelled", |
| 76 l10n_util::GetStringUTF16(IDS_DOWNLOAD_TAB_CANCELED)); | 76 l10n_util::GetStringUTF16(IDS_DOWNLOAD_TAB_CANCELED)); |
| 77 localized_strings.SetString("status_removed", |
| 78 l10n_util::GetStringUTF16(IDS_DOWNLOAD_FILE_REMOVED)); |
| 77 localized_strings.SetString("status_paused", | 79 localized_strings.SetString("status_paused", |
| 78 l10n_util::GetStringUTF16(IDS_DOWNLOAD_PROGRESS_PAUSED)); | 80 l10n_util::GetStringUTF16(IDS_DOWNLOAD_PROGRESS_PAUSED)); |
| 79 localized_strings.SetString("status_interrupted", | 81 localized_strings.SetString("status_interrupted", |
| 80 l10n_util::GetStringUTF16(IDS_DOWNLOAD_PROGRESS_INTERRUPTED)); | 82 l10n_util::GetStringUTF16(IDS_DOWNLOAD_PROGRESS_INTERRUPTED)); |
| 81 | 83 |
| 82 // Dangerous file. | 84 // Dangerous file. |
| 83 localized_strings.SetString("danger_file_desc", | 85 localized_strings.SetString("danger_file_desc", |
| 84 l10n_util::GetStringUTF16(IDS_PROMPT_DANGEROUS_DOWNLOAD)); | 86 l10n_util::GetStringUTF16(IDS_PROMPT_DANGEROUS_DOWNLOAD)); |
| 85 localized_strings.SetString("danger_url_desc", | 87 localized_strings.SetString("danger_url_desc", |
| 86 l10n_util::GetStringUTF16(IDS_PROMPT_UNSAFE_DOWNLOAD_URL)); | 88 l10n_util::GetStringUTF16(IDS_PROMPT_UNSAFE_DOWNLOAD_URL)); |
| (...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 140 | 142 |
| 141 // Set up the chrome://downloads/ source. | 143 // Set up the chrome://downloads/ source. |
| 142 contents->profile()->GetChromeURLDataManager()->AddDataSource(html_source); | 144 contents->profile()->GetChromeURLDataManager()->AddDataSource(html_source); |
| 143 } | 145 } |
| 144 | 146 |
| 145 // static | 147 // static |
| 146 RefCountedMemory* DownloadsUI::GetFaviconResourceBytes() { | 148 RefCountedMemory* DownloadsUI::GetFaviconResourceBytes() { |
| 147 return ResourceBundle::GetSharedInstance(). | 149 return ResourceBundle::GetSharedInstance(). |
| 148 LoadDataResourceBytes(IDR_DOWNLOADS_FAVICON); | 150 LoadDataResourceBytes(IDR_DOWNLOADS_FAVICON); |
| 149 } | 151 } |
| OLD | NEW |