OLD | NEW |
1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 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_dom_handler.h" | 5 #include "chrome/browser/dom_ui/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" |
11 #include "base/callback.h" | 11 #include "base/callback.h" |
12 #include "base/singleton.h" | 12 #include "base/singleton.h" |
13 #include "base/string_piece.h" | 13 #include "base/string_piece.h" |
14 #include "base/thread.h" | 14 #include "base/threading/thread.h" |
15 #include "base/utf_string_conversions.h" | 15 #include "base/utf_string_conversions.h" |
16 #include "base/values.h" | 16 #include "base/values.h" |
17 #include "chrome/browser/browser_process.h" | 17 #include "chrome/browser/browser_process.h" |
18 #include "chrome/browser/browser_thread.h" | 18 #include "chrome/browser/browser_thread.h" |
19 #include "chrome/browser/dom_ui/chrome_url_data_manager.h" | 19 #include "chrome/browser/dom_ui/chrome_url_data_manager.h" |
20 #include "chrome/browser/dom_ui/fileicon_source.h" | 20 #include "chrome/browser/dom_ui/fileicon_source.h" |
21 #include "chrome/browser/download/download_history.h" | 21 #include "chrome/browser/download/download_history.h" |
22 #include "chrome/browser/download/download_item.h" | 22 #include "chrome/browser/download/download_item.h" |
23 #include "chrome/browser/download/download_util.h" | 23 #include "chrome/browser/download/download_util.h" |
24 #include "chrome/browser/metrics/user_metrics.h" | 24 #include "chrome/browser/metrics/user_metrics.h" |
(...skipping 218 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
243 return NULL; | 243 return NULL; |
244 } | 244 } |
245 | 245 |
246 DownloadItem* DownloadsDOMHandler::GetDownloadByValue(const ListValue* args) { | 246 DownloadItem* DownloadsDOMHandler::GetDownloadByValue(const ListValue* args) { |
247 int id; | 247 int id; |
248 if (ExtractIntegerValue(args, &id)) { | 248 if (ExtractIntegerValue(args, &id)) { |
249 return GetDownloadById(id); | 249 return GetDownloadById(id); |
250 } | 250 } |
251 return NULL; | 251 return NULL; |
252 } | 252 } |
OLD | NEW |