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

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

Issue 8437002: Move BrowserThread to content namespace. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: A few updates. 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/webui/devtools_ui.cc ('k') | chrome/browser/ui/webui/gpu_internals_ui.cc » ('j') | 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/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 21 matching lines...) Expand all
32 #include "content/browser/download/download_item.h" 32 #include "content/browser/download/download_item.h"
33 #include "content/browser/tab_contents/tab_contents.h" 33 #include "content/browser/tab_contents/tab_contents.h"
34 #include "content/browser/user_metrics.h" 34 #include "content/browser/user_metrics.h"
35 #include "grit/generated_resources.h" 35 #include "grit/generated_resources.h"
36 #include "ui/gfx/image/image.h" 36 #include "ui/gfx/image/image.h"
37 37
38 #if !defined(OS_MACOSX) 38 #if !defined(OS_MACOSX)
39 #include "content/public/browser/browser_thread.h" 39 #include "content/public/browser/browser_thread.h"
40 #endif 40 #endif
41 41
42 using content::BrowserThread;
43
42 namespace { 44 namespace {
43 45
44 // Maximum number of downloads to show. TODO(glen): Remove this and instead 46 // Maximum number of downloads to show. TODO(glen): Remove this and instead
45 // stuff the downloads down the pipe slowly. 47 // stuff the downloads down the pipe slowly.
46 static const int kMaxDownloads = 150; 48 static const int kMaxDownloads = 150;
47 49
48 // Sort DownloadItems into descending order by their start time. 50 // Sort DownloadItems into descending order by their start time.
49 class DownloadItemSorter : public std::binary_function<DownloadItem*, 51 class DownloadItemSorter : public std::binary_function<DownloadItem*,
50 DownloadItem*, 52 DownloadItem*,
51 bool> { 53 bool> {
(...skipping 351 matching lines...) Expand 10 before | Expand all | Expand 10 after
403 return NULL; 405 return NULL;
404 } 406 }
405 407
406 DownloadItem* DownloadsDOMHandler::GetDownloadByValue(const ListValue* args) { 408 DownloadItem* DownloadsDOMHandler::GetDownloadByValue(const ListValue* args) {
407 int id; 409 int id;
408 if (ExtractIntegerValue(args, &id)) { 410 if (ExtractIntegerValue(args, &id)) {
409 return GetDownloadById(id); 411 return GetDownloadById(id);
410 } 412 }
411 return NULL; 413 return NULL;
412 } 414 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/webui/devtools_ui.cc ('k') | chrome/browser/ui/webui/gpu_internals_ui.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698