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

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: Rebased only 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 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
49 source->AddLocalizedString("status_paused", IDS_DOWNLOAD_PROGRESS_PAUSED); 49 source->AddLocalizedString("status_paused", IDS_DOWNLOAD_PROGRESS_PAUSED);
50 source->AddLocalizedString("status_interrupted", 50 source->AddLocalizedString("status_interrupted",
51 IDS_DOWNLOAD_PROGRESS_INTERRUPTED); 51 IDS_DOWNLOAD_PROGRESS_INTERRUPTED);
52 52
53 // Dangerous file. 53 // Dangerous file.
54 source->AddLocalizedString("danger_file_desc", IDS_PROMPT_DANGEROUS_DOWNLOAD); 54 source->AddLocalizedString("danger_file_desc", IDS_PROMPT_DANGEROUS_DOWNLOAD);
55 source->AddLocalizedString("danger_url_desc", 55 source->AddLocalizedString("danger_url_desc",
56 IDS_PROMPT_MALICIOUS_DOWNLOAD_URL); 56 IDS_PROMPT_MALICIOUS_DOWNLOAD_URL);
57 source->AddLocalizedString("danger_content_desc", 57 source->AddLocalizedString("danger_content_desc",
58 IDS_PROMPT_MALICIOUS_DOWNLOAD_CONTENT); 58 IDS_PROMPT_MALICIOUS_DOWNLOAD_CONTENT);
59 source->AddLocalizedString("danger_uncommon_desc",
60 IDS_PROMPT_UNCOMMON_DOWNLOAD_CONTENT);
59 source->AddLocalizedString("danger_save", IDS_CONFIRM_DOWNLOAD); 61 source->AddLocalizedString("danger_save", IDS_CONFIRM_DOWNLOAD);
60 source->AddLocalizedString("danger_discard", IDS_DISCARD_DOWNLOAD); 62 source->AddLocalizedString("danger_discard", IDS_DISCARD_DOWNLOAD);
61 63
62 // Controls. 64 // Controls.
63 source->AddLocalizedString("control_pause", IDS_DOWNLOAD_LINK_PAUSE); 65 source->AddLocalizedString("control_pause", IDS_DOWNLOAD_LINK_PAUSE);
64 if (browser_defaults::kDownloadPageHasShowInFolder) { 66 if (browser_defaults::kDownloadPageHasShowInFolder) {
65 source->AddLocalizedString("control_showinfolder", IDS_DOWNLOAD_LINK_SHOW); 67 source->AddLocalizedString("control_showinfolder", IDS_DOWNLOAD_LINK_SHOW);
66 } 68 }
67 source->AddLocalizedString("control_retry", IDS_DOWNLOAD_LINK_RETRY); 69 source->AddLocalizedString("control_retry", IDS_DOWNLOAD_LINK_RETRY);
68 source->AddLocalizedString("control_cancel", IDS_DOWNLOAD_LINK_CANCEL); 70 source->AddLocalizedString("control_cancel", IDS_DOWNLOAD_LINK_CANCEL);
(...skipping 27 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

Powered by Google App Engine
This is Rietveld 408576698