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

Side by Side Diff: content/browser/download/download_manager.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
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 "content/browser/download/download_manager.h" 5 #include "content/browser/download/download_manager.h"
6 6
7 #include <iterator> 7 #include <iterator>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/callback.h" 10 #include "base/callback.h"
(...skipping 17 matching lines...) Expand all
28 #include "content/browser/renderer_host/render_process_host.h" 28 #include "content/browser/renderer_host/render_process_host.h"
29 #include "content/browser/renderer_host/render_view_host.h" 29 #include "content/browser/renderer_host/render_view_host.h"
30 #include "content/browser/renderer_host/resource_dispatcher_host.h" 30 #include "content/browser/renderer_host/resource_dispatcher_host.h"
31 #include "content/browser/tab_contents/tab_contents.h" 31 #include "content/browser/tab_contents/tab_contents.h"
32 #include "content/public/browser/browser_thread.h" 32 #include "content/public/browser/browser_thread.h"
33 #include "content/public/browser/content_browser_client.h" 33 #include "content/public/browser/content_browser_client.h"
34 #include "content/public/browser/download_manager_delegate.h" 34 #include "content/public/browser/download_manager_delegate.h"
35 #include "content/public/browser/notification_service.h" 35 #include "content/public/browser/notification_service.h"
36 #include "content/public/browser/notification_types.h" 36 #include "content/public/browser/notification_types.h"
37 37
38 using content::BrowserThread;
39
38 namespace { 40 namespace {
39 41
40 // Param structs exist because base::Bind can only handle 6 args. 42 // Param structs exist because base::Bind can only handle 6 args.
41 struct URLParams { 43 struct URLParams {
42 URLParams(const GURL& url, const GURL& referrer) 44 URLParams(const GURL& url, const GURL& referrer)
43 : url_(url), referrer_(referrer) {} 45 : url_(url), referrer_(referrer) {}
44 GURL url_; 46 GURL url_;
45 GURL referrer_; 47 GURL referrer_;
46 }; 48 };
47 49
(...skipping 1022 matching lines...) Expand 10 before | Expand all | Expand 10 after
1070 void DownloadManager::MarkDownloadOpened(DownloadItem* download) { 1072 void DownloadManager::MarkDownloadOpened(DownloadItem* download) {
1071 delegate_->UpdateItemInPersistentStore(download); 1073 delegate_->UpdateItemInPersistentStore(download);
1072 int num_unopened = 0; 1074 int num_unopened = 0;
1073 for (DownloadMap::iterator it = history_downloads_.begin(); 1075 for (DownloadMap::iterator it = history_downloads_.begin();
1074 it != history_downloads_.end(); ++it) { 1076 it != history_downloads_.end(); ++it) {
1075 if (it->second->IsComplete() && !it->second->opened()) 1077 if (it->second->IsComplete() && !it->second->opened())
1076 ++num_unopened; 1078 ++num_unopened;
1077 } 1079 }
1078 download_stats::RecordOpensOutstanding(num_unopened); 1080 download_stats::RecordOpensOutstanding(num_unopened);
1079 } 1081 }
OLDNEW
« no previous file with comments | « content/browser/download/download_manager.h ('k') | content/browser/download/download_request_handle.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698