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

Side by Side Diff: content/browser/download/download_manager_impl.cc

Issue 9473001: Extract minimal RenderViewHost interface for embedders, leaving (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Merge to LKGR. Created 8 years, 9 months 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) 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 "content/browser/download/download_manager_impl.h" 5 #include "content/browser/download/download_manager_impl.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 824 matching lines...) Expand 10 before | Expand all | Expand 10 after
835 // base::Bind can't handle 7 args, so we use URLParams and RenderParams. 835 // base::Bind can't handle 7 args, so we use URLParams and RenderParams.
836 BrowserThread::PostTask( 836 BrowserThread::PostTask(
837 BrowserThread::IO, FROM_HERE, 837 BrowserThread::IO, FROM_HERE,
838 base::Bind( 838 base::Bind(
839 &BeginDownload, 839 &BeginDownload,
840 URLParams(url, referrer, post_id), 840 URLParams(url, referrer, post_id),
841 prefer_cache, 841 prefer_cache,
842 save_info, 842 save_info,
843 resource_dispatcher_host, 843 resource_dispatcher_host,
844 RenderParams(web_contents->GetRenderProcessHost()->GetID(), 844 RenderParams(web_contents->GetRenderProcessHost()->GetID(),
845 web_contents->GetRenderViewHost()->routing_id()), 845 web_contents->GetRenderViewHost()->GetRoutingID()),
846 web_contents->GetBrowserContext()->GetResourceContext())); 846 web_contents->GetBrowserContext()->GetResourceContext()));
847 } 847 }
848 848
849 void DownloadManagerImpl::AddObserver(Observer* observer) { 849 void DownloadManagerImpl::AddObserver(Observer* observer) {
850 observers_.AddObserver(observer); 850 observers_.AddObserver(observer);
851 // TODO: It is the responsibility of the observers to query the 851 // TODO: It is the responsibility of the observers to query the
852 // DownloadManager. Remove the following call from here and update all 852 // DownloadManager. Remove the following call from here and update all
853 // observers. 853 // observers.
854 observer->ModelChanged(this); 854 observer->ModelChanged(this);
855 } 855 }
(...skipping 303 matching lines...) Expand 10 before | Expand all | Expand 10 after
1159 it != history_downloads_.end(); ++it) { 1159 it != history_downloads_.end(); ++it) {
1160 if (it->second->IsComplete() && !it->second->GetOpened()) 1160 if (it->second->IsComplete() && !it->second->GetOpened())
1161 ++num_unopened; 1161 ++num_unopened;
1162 } 1162 }
1163 download_stats::RecordOpensOutstanding(num_unopened); 1163 download_stats::RecordOpensOutstanding(num_unopened);
1164 } 1164 }
1165 1165
1166 void DownloadManagerImpl::SetFileManager(DownloadFileManager* file_manager) { 1166 void DownloadManagerImpl::SetFileManager(DownloadFileManager* file_manager) {
1167 file_manager_ = file_manager; 1167 file_manager_ = file_manager;
1168 } 1168 }
OLDNEW
« no previous file with comments | « content/browser/debugger/render_view_devtools_agent_host.cc ('k') | content/browser/download/download_request_handle.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698