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

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

Issue 352393002: Be explicit about target type in platform_util::OpenItem() (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Simplify Chrome OS change. Created 6 years, 2 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_dom_handler.h" 5 #include "chrome/browser/ui/webui/downloads_dom_handler.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <functional> 8 #include <functional>
9 9
10 #include "base/basictypes.h" 10 #include "base/basictypes.h"
(...skipping 456 matching lines...) Expand 10 before | Expand all | Expand 10 after
467 // OnDownloadRemoved() will call it, but if no downloads are actually removed, 467 // OnDownloadRemoved() will call it, but if no downloads are actually removed,
468 // then HandleClearAll needs to call it manually. 468 // then HandleClearAll needs to call it manually.
469 ScheduleSendCurrentDownloads(); 469 ScheduleSendCurrentDownloads();
470 } 470 }
471 471
472 void DownloadsDOMHandler::HandleOpenDownloadsFolder( 472 void DownloadsDOMHandler::HandleOpenDownloadsFolder(
473 const base::ListValue* args) { 473 const base::ListValue* args) {
474 CountDownloadsDOMEvents(DOWNLOADS_DOM_EVENT_OPEN_FOLDER); 474 CountDownloadsDOMEvents(DOWNLOADS_DOM_EVENT_OPEN_FOLDER);
475 content::DownloadManager* manager = main_notifier_.GetManager(); 475 content::DownloadManager* manager = main_notifier_.GetManager();
476 if (manager) { 476 if (manager) {
477 platform_util::OpenItem( 477 platform_util::OpenFolder(
478 Profile::FromBrowserContext(manager->GetBrowserContext()), 478 Profile::FromBrowserContext(manager->GetBrowserContext()),
479 DownloadPrefs::FromDownloadManager(manager)->DownloadPath()); 479 DownloadPrefs::FromDownloadManager(manager)->DownloadPath());
480 } 480 }
481 } 481 }
482 482
483 // DownloadsDOMHandler, private: ---------------------------------------------- 483 // DownloadsDOMHandler, private: ----------------------------------------------
484 484
485 void DownloadsDOMHandler::ScheduleSendCurrentDownloads() { 485 void DownloadsDOMHandler::ScheduleSendCurrentDownloads() {
486 // Don't call SendCurrentDownloads() every time anything changes. Batch them 486 // Don't call SendCurrentDownloads() every time anything changes. Batch them
487 // together instead. This may handle hundreds of OnDownloadDestroyed() calls 487 // together instead. This may handle hundreds of OnDownloadDestroyed() calls
(...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after
579 } 579 }
580 580
581 void DownloadsDOMHandler::CallDownloadsList(const base::ListValue& downloads) { 581 void DownloadsDOMHandler::CallDownloadsList(const base::ListValue& downloads) {
582 web_ui()->CallJavascriptFunction("downloadsList", downloads); 582 web_ui()->CallJavascriptFunction("downloadsList", downloads);
583 } 583 }
584 584
585 void DownloadsDOMHandler::CallDownloadUpdated( 585 void DownloadsDOMHandler::CallDownloadUpdated(
586 const base::ListValue& download_item) { 586 const base::ListValue& download_item) {
587 web_ui()->CallJavascriptFunction("downloadUpdated", download_item); 587 web_ui()->CallJavascriptFunction("downloadUpdated", download_item);
588 } 588 }
OLDNEW
« chrome/browser/chromeos/file_manager/open_util.cc ('K') | « chrome/browser/platform_util_win.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698