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

Side by Side Diff: chrome/browser/download/download_util.cc

Issue 6338002: net: Remove typedef net::URLRequestContext URLRequestContext; (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: for real Created 9 years, 11 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) 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 // Download utility implementation 5 // Download utility implementation
6 6
7 #include "chrome/browser/download/download_util.h" 7 #include "chrome/browser/download/download_util.h"
8 8
9 #if defined(OS_WIN) 9 #if defined(OS_WIN)
10 #include <shobjidl.h> 10 #include <shobjidl.h>
(...skipping 671 matching lines...) Expand 10 before | Expand all | Expand 10 after
682 const GURL& url, 682 const GURL& url,
683 const GURL& referrer, 683 const GURL& referrer,
684 const std::string& referrer_charset, 684 const std::string& referrer_charset,
685 const DownloadSaveInfo& save_info, 685 const DownloadSaveInfo& save_info,
686 ResourceDispatcherHost* rdh, 686 ResourceDispatcherHost* rdh,
687 int render_process_host_id, 687 int render_process_host_id,
688 int render_view_id, 688 int render_view_id,
689 URLRequestContextGetter* request_context_getter) { 689 URLRequestContextGetter* request_context_getter) {
690 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO)); 690 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO));
691 691
692 URLRequestContext* context = request_context_getter->GetURLRequestContext(); 692 net::URLRequestContext* context =
693 request_context_getter->GetURLRequestContext();
693 context->set_referrer_charset(referrer_charset); 694 context->set_referrer_charset(referrer_charset);
694 695
695 rdh->BeginDownload(url, 696 rdh->BeginDownload(url,
696 referrer, 697 referrer,
697 save_info, 698 save_info,
698 true, // Show "Save as" UI. 699 true, // Show "Save as" UI.
699 render_process_host_id, 700 render_process_host_id,
700 render_view_id, 701 render_view_id,
701 context); 702 context);
702 } 703 }
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after
771 !service->IsDownloadFromGallery(info->url, info->referrer_url)) { 772 !service->IsDownloadFromGallery(info->url, info->referrer_url)) {
772 // Extensions that are not from the gallery are considered dangerous. 773 // Extensions that are not from the gallery are considered dangerous.
773 return true; 774 return true;
774 } 775 }
775 } 776 }
776 777
777 return false; 778 return false;
778 } 779 }
779 780
780 } // namespace download_util 781 } // namespace download_util
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698