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

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

Issue 8574054: Replace FileManagerUtil class with namespace file_manager_util. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: rebase Created 9 years, 1 month 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
« no previous file with comments | « chrome/browser/ui/views/select_file_dialog_extension.cc ('k') | no next file » | 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) 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/active_downloads_ui.h" 5 #include "chrome/browser/ui/webui/active_downloads_ui.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <string> 8 #include <string>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 232 matching lines...) Expand 10 before | Expand all | Expand 10 after
243 void ActiveDownloadsHandler::HandleCancelDownload(const ListValue* args) { 243 void ActiveDownloadsHandler::HandleCancelDownload(const ListValue* args) {
244 DownloadItem* item = GetDownloadById(args); 244 DownloadItem* item = GetDownloadById(args);
245 if (item) { 245 if (item) {
246 if (item->IsPartialDownload()) 246 if (item->IsPartialDownload())
247 item->Cancel(true); 247 item->Cancel(true);
248 item->Delete(DownloadItem::DELETE_DUE_TO_USER_DISCARD); 248 item->Delete(DownloadItem::DELETE_DUE_TO_USER_DISCARD);
249 } 249 }
250 } 250 }
251 251
252 void ActiveDownloadsHandler::HandleShowAllFiles(const ListValue* args) { 252 void ActiveDownloadsHandler::HandleShowAllFiles(const ListValue* args) {
253 FileManagerUtil::ViewFolder( 253 file_manager_util::ViewFolder(
254 DownloadPrefs::FromDownloadManager(download_manager_)->download_path()); 254 DownloadPrefs::FromDownloadManager(download_manager_)->download_path());
255 } 255 }
256 256
257 bool ActiveDownloadsHandler::SelectTab(const GURL& url) { 257 bool ActiveDownloadsHandler::SelectTab(const GURL& url) {
258 for (TabContentsIterator it; !it.done(); ++it) { 258 for (TabContentsIterator it; !it.done(); ++it) {
259 TabContents* tab_contents = it->tab_contents(); 259 TabContents* tab_contents = it->tab_contents();
260 if (tab_contents->GetURL() == url) { 260 if (tab_contents->GetURL() == url) {
261 static_cast<RenderViewHostDelegate*>(tab_contents)->Activate(); 261 static_cast<RenderViewHostDelegate*>(tab_contents)->Activate();
262 return true; 262 return true;
263 } 263 }
(...skipping 175 matching lines...) Expand 10 before | Expand all | Expand 10 after
439 } 439 }
440 } 440 }
441 } 441 }
442 return NULL; 442 return NULL;
443 } 443 }
444 #endif // defined(TOUCH_UI) 444 #endif // defined(TOUCH_UI)
445 445
446 const ActiveDownloadsUI::DownloadList& ActiveDownloadsUI::GetDownloads() const { 446 const ActiveDownloadsUI::DownloadList& ActiveDownloadsUI::GetDownloads() const {
447 return handler_->downloads(); 447 return handler_->downloads();
448 } 448 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/views/select_file_dialog_extension.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698