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

Side by Side Diff: chrome/browser/dom_ui/downloads_ui.cc

Issue 506045: Don't show "show in foloder" in chrome os. (Closed)
Patch Set: " Created 11 years 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
« no previous file with comments | « chrome/browser/defaults.cc ('k') | chrome/browser/resources/downloads.html » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2006-2009 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2006-2009 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/dom_ui/downloads_ui.h" 5 #include "chrome/browser/dom_ui/downloads_ui.h"
6 6
7 #include "app/l10n_util.h" 7 #include "app/l10n_util.h"
8 #include "app/resource_bundle.h" 8 #include "app/resource_bundle.h"
9 #include "base/singleton.h" 9 #include "base/singleton.h"
10 #include "base/string_piece.h" 10 #include "base/string_piece.h"
11 #include "base/thread.h" 11 #include "base/thread.h"
12 #include "base/values.h" 12 #include "base/values.h"
13 #include "chrome/browser/chrome_thread.h" 13 #include "chrome/browser/chrome_thread.h"
14 #include "chrome/browser/defaults.h"
14 #include "chrome/browser/dom_ui/chrome_url_data_manager.h" 15 #include "chrome/browser/dom_ui/chrome_url_data_manager.h"
15 #include "chrome/browser/dom_ui/downloads_dom_handler.h" 16 #include "chrome/browser/dom_ui/downloads_dom_handler.h"
16 #include "chrome/browser/download/download_manager.h" 17 #include "chrome/browser/download/download_manager.h"
17 #include "chrome/browser/profile.h" 18 #include "chrome/browser/profile.h"
18 #include "chrome/common/jstemplate_builder.h" 19 #include "chrome/common/jstemplate_builder.h"
19 #include "chrome/common/url_constants.h" 20 #include "chrome/common/url_constants.h"
20 #include "grit/browser_resources.h" 21 #include "grit/browser_resources.h"
21 #include "grit/generated_resources.h" 22 #include "grit/generated_resources.h"
22 #include "grit/theme_resources.h" 23 #include "grit/theme_resources.h"
23 24
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after
78 localized_strings.SetString(L"danger_desc", 79 localized_strings.SetString(L"danger_desc",
79 l10n_util::GetStringF(IDS_PROMPT_DANGEROUS_DOWNLOAD, L"%s")); 80 l10n_util::GetStringF(IDS_PROMPT_DANGEROUS_DOWNLOAD, L"%s"));
80 localized_strings.SetString(L"danger_save", 81 localized_strings.SetString(L"danger_save",
81 l10n_util::GetString(IDS_SAVE_DOWNLOAD)); 82 l10n_util::GetString(IDS_SAVE_DOWNLOAD));
82 localized_strings.SetString(L"danger_discard", 83 localized_strings.SetString(L"danger_discard",
83 l10n_util::GetString(IDS_DISCARD_DOWNLOAD)); 84 l10n_util::GetString(IDS_DISCARD_DOWNLOAD));
84 85
85 // Controls. 86 // Controls.
86 localized_strings.SetString(L"control_pause", 87 localized_strings.SetString(L"control_pause",
87 l10n_util::GetString(IDS_DOWNLOAD_LINK_PAUSE)); 88 l10n_util::GetString(IDS_DOWNLOAD_LINK_PAUSE));
88 localized_strings.SetString(L"control_showinfolder", 89 if (browser_defaults::kDownloadPageHasShowInFolder) {
89 l10n_util::GetString(IDS_DOWNLOAD_LINK_SHOW)); 90 localized_strings.SetString(L"control_showinfolder",
91 l10n_util::GetString(IDS_DOWNLOAD_LINK_SHOW));
92 }
90 localized_strings.SetString(L"control_cancel", 93 localized_strings.SetString(L"control_cancel",
91 l10n_util::GetString(IDS_DOWNLOAD_LINK_CANCEL)); 94 l10n_util::GetString(IDS_DOWNLOAD_LINK_CANCEL));
92 localized_strings.SetString(L"control_resume", 95 localized_strings.SetString(L"control_resume",
93 l10n_util::GetString(IDS_DOWNLOAD_LINK_RESUME)); 96 l10n_util::GetString(IDS_DOWNLOAD_LINK_RESUME));
94 localized_strings.SetString(L"control_removefromlist", 97 localized_strings.SetString(L"control_removefromlist",
95 l10n_util::GetString(IDS_DOWNLOAD_LINK_REMOVE)); 98 l10n_util::GetString(IDS_DOWNLOAD_LINK_REMOVE));
96 99
97 SetFontAndTextDirection(&localized_strings); 100 SetFontAndTextDirection(&localized_strings);
98 101
99 static const base::StringPiece downloads_html( 102 static const base::StringPiece downloads_html(
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
134 NewRunnableMethod(Singleton<ChromeURLDataManager>::get(), 137 NewRunnableMethod(Singleton<ChromeURLDataManager>::get(),
135 &ChromeURLDataManager::AddDataSource, 138 &ChromeURLDataManager::AddDataSource,
136 make_scoped_refptr(html_source))); 139 make_scoped_refptr(html_source)));
137 } 140 }
138 141
139 // static 142 // static
140 RefCountedMemory* DownloadsUI::GetFaviconResourceBytes() { 143 RefCountedMemory* DownloadsUI::GetFaviconResourceBytes() {
141 return ResourceBundle::GetSharedInstance(). 144 return ResourceBundle::GetSharedInstance().
142 LoadDataResourceBytes(IDR_DOWNLOADS_FAVICON); 145 LoadDataResourceBytes(IDR_DOWNLOADS_FAVICON);
143 } 146 }
OLDNEW
« no previous file with comments | « chrome/browser/defaults.cc ('k') | chrome/browser/resources/downloads.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698