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

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

Issue 9317018: referrer_charset is a lie. It's really the user's default_charset. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 8 years, 10 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 815 matching lines...) Expand 10 before | Expand all | Expand 10 after
826 // The null times make the date range unbounded. 826 // The null times make the date range unbounded.
827 return RemoveDownloadsBetween(base::Time(), base::Time()); 827 return RemoveDownloadsBetween(base::Time(), base::Time());
828 } 828 }
829 829
830 // Initiate a download of a specific URL. We send the request to the 830 // Initiate a download of a specific URL. We send the request to the
831 // ResourceDispatcherHost, and let it send us responses like a regular 831 // ResourceDispatcherHost, and let it send us responses like a regular
832 // download. 832 // download.
833 void DownloadManagerImpl::DownloadUrl( 833 void DownloadManagerImpl::DownloadUrl(
834 const GURL& url, 834 const GURL& url,
835 const GURL& referrer, 835 const GURL& referrer,
836 const std::string& referrer_charset, 836 const std::string& default_charset,
837 bool prefer_cache, 837 bool prefer_cache,
838 const DownloadSaveInfo& save_info, 838 const DownloadSaveInfo& save_info,
839 WebContents* web_contents) { 839 WebContents* web_contents) {
840 ResourceDispatcherHost* resource_dispatcher_host = 840 ResourceDispatcherHost* resource_dispatcher_host =
841 ResourceDispatcherHost::Get(); 841 ResourceDispatcherHost::Get();
842 842
843 // We send a pointer to content::ResourceContext, instead of the usual 843 // We send a pointer to content::ResourceContext, instead of the usual
844 // reference, so that a copy of the object isn't made. 844 // reference, so that a copy of the object isn't made.
845 // base::Bind can't handle 7 args, so we use URLParams and RenderParams. 845 // base::Bind can't handle 7 args, so we use URLParams and RenderParams.
846 BrowserThread::PostTask( 846 BrowserThread::PostTask(
(...skipping 360 matching lines...) Expand 10 before | Expand all | Expand 10 after
1207 it != history_downloads_.end(); ++it) { 1207 it != history_downloads_.end(); ++it) {
1208 if (it->second->IsComplete() && !it->second->GetOpened()) 1208 if (it->second->IsComplete() && !it->second->GetOpened())
1209 ++num_unopened; 1209 ++num_unopened;
1210 } 1210 }
1211 download_stats::RecordOpensOutstanding(num_unopened); 1211 download_stats::RecordOpensOutstanding(num_unopened);
1212 } 1212 }
1213 1213
1214 void DownloadManagerImpl::SetFileManager(DownloadFileManager* file_manager) { 1214 void DownloadManagerImpl::SetFileManager(DownloadFileManager* file_manager) {
1215 file_manager_ = file_manager; 1215 file_manager_ = file_manager;
1216 } 1216 }
OLDNEW
« no previous file with comments | « content/browser/download/download_item_impl.cc ('k') | content/browser/download/download_manager_impl_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698