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 "base/basictypes.h" | 7 #include "base/basictypes.h" |
8 #include "base/callback.h" | 8 #include "base/callback.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/utf_string_conversions.h" | 12 #include "base/utf_string_conversions.h" |
13 #include "base/values.h" | 13 #include "base/values.h" |
14 #include "chrome/browser/browser_process.h" | 14 #include "chrome/browser/browser_process.h" |
15 #include "chrome/browser/browser_thread.h" | 15 #include "chrome/browser/browser_thread.h" |
16 #include "chrome/browser/dom_ui/chrome_url_data_manager.h" | 16 #include "chrome/browser/dom_ui/chrome_url_data_manager.h" |
17 #include "chrome/browser/dom_ui/fileicon_source.h" | 17 #include "chrome/browser/dom_ui/fileicon_source.h" |
18 #include "chrome/browser/download/download_history.h" | 18 #include "chrome/browser/download/download_history.h" |
19 #include "chrome/browser/download/download_item.h" | 19 #include "chrome/browser/download/download_item.h" |
20 #include "chrome/browser/download/download_util.h" | 20 #include "chrome/browser/download/download_util.h" |
21 #include "chrome/browser/metrics/user_metrics.h" | 21 #include "chrome/browser/metrics/user_metrics.h" |
22 #include "chrome/browser/profile.h" | 22 #include "chrome/browser/profiles/profile.h" |
23 #include "chrome/browser/tab_contents/tab_contents.h" | 23 #include "chrome/browser/tab_contents/tab_contents.h" |
24 #include "chrome/common/jstemplate_builder.h" | 24 #include "chrome/common/jstemplate_builder.h" |
25 #include "chrome/common/url_constants.h" | 25 #include "chrome/common/url_constants.h" |
26 #include "grit/browser_resources.h" | 26 #include "grit/browser_resources.h" |
27 #include "grit/generated_resources.h" | 27 #include "grit/generated_resources.h" |
28 | 28 |
29 namespace { | 29 namespace { |
30 | 30 |
31 // Maximum number of downloads to show. TODO(glen): Remove this and instead | 31 // Maximum number of downloads to show. TODO(glen): Remove this and instead |
32 // stuff the downloads down the pipe slowly. | 32 // stuff the downloads down the pipe slowly. |
(...skipping 208 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
241 return NULL; | 241 return NULL; |
242 } | 242 } |
243 | 243 |
244 DownloadItem* DownloadsDOMHandler::GetDownloadByValue(const ListValue* args) { | 244 DownloadItem* DownloadsDOMHandler::GetDownloadByValue(const ListValue* args) { |
245 int id; | 245 int id; |
246 if (ExtractIntegerValue(args, &id)) { | 246 if (ExtractIntegerValue(args, &id)) { |
247 return GetDownloadById(id); | 247 return GetDownloadById(id); |
248 } | 248 } |
249 return NULL; | 249 return NULL; |
250 } | 250 } |
OLD | NEW |