OLD | NEW |
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/md_downloads/md_downloads_dom_handler.h" | 5 #include "chrome/browser/ui/webui/md_downloads/md_downloads_dom_handler.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 #include <functional> | 8 #include <functional> |
9 | 9 |
10 #include "base/bind.h" | 10 #include "base/bind.h" |
11 #include "base/bind_helpers.h" | 11 #include "base/bind_helpers.h" |
12 #include "base/i18n/rtl.h" | 12 #include "base/i18n/rtl.h" |
13 #include "base/logging.h" | 13 #include "base/logging.h" |
| 14 #include "base/message_loop/message_loop.h" |
14 #include "base/metrics/histogram_macros.h" | 15 #include "base/metrics/histogram_macros.h" |
15 #include "base/strings/string_number_conversions.h" | 16 #include "base/strings/string_number_conversions.h" |
16 #include "base/strings/string_piece.h" | 17 #include "base/strings/string_piece.h" |
17 #include "base/strings/utf_string_conversions.h" | 18 #include "base/strings/utf_string_conversions.h" |
18 #include "base/supports_user_data.h" | 19 #include "base/supports_user_data.h" |
19 #include "base/threading/thread.h" | 20 #include "base/threading/thread.h" |
20 #include "base/values.h" | 21 #include "base/values.h" |
21 #include "chrome/browser/browser_process.h" | 22 #include "chrome/browser/browser_process.h" |
22 #include "chrome/browser/download/download_danger_prompt.h" | 23 #include "chrome/browser/download/download_danger_prompt.h" |
23 #include "chrome/browser/download/download_history.h" | 24 #include "chrome/browser/download/download_history.h" |
(...skipping 428 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
452 | 453 |
453 void MdDownloadsDOMHandler::RemoveDownloadInArgs(const base::ListValue* args) { | 454 void MdDownloadsDOMHandler::RemoveDownloadInArgs(const base::ListValue* args) { |
454 content::DownloadItem* file = GetDownloadByValue(args); | 455 content::DownloadItem* file = GetDownloadByValue(args); |
455 if (!file) | 456 if (!file) |
456 return; | 457 return; |
457 | 458 |
458 DownloadVector downloads; | 459 DownloadVector downloads; |
459 downloads.push_back(file); | 460 downloads.push_back(file); |
460 RemoveDownloads(downloads); | 461 RemoveDownloads(downloads); |
461 } | 462 } |
OLD | NEW |