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

Side by Side Diff: content/browser/loader/resource_dispatcher_host_impl.cc

Issue 1484093002: Allowing multiple SaveItems to have same URLs. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@nested-frames-more-involved-fix
Patch Set: Rebasing... Created 5 years 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
« no previous file with comments | « content/browser/loader/resource_dispatcher_host_impl.h ('k') | no next file » | 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) 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 // See http://dev.chromium.org/developers/design-documents/multi-process-resourc e-loading 5 // See http://dev.chromium.org/developers/design-documents/multi-process-resourc e-loading
6 6
7 #include "content/browser/loader/resource_dispatcher_host_impl.h" 7 #include "content/browser/loader/resource_dispatcher_host_impl.h"
8 8
9 #include <algorithm> 9 #include <algorithm>
10 #include <set> 10 #include <set>
(...skipping 1691 matching lines...) Expand 10 before | Expand all | Expand 10 after
1702 // The ResourceDispatcherHost may have already been shut down. 1702 // The ResourceDispatcherHost may have already been shut down.
1703 // See http://crbug.com/455098 1703 // See http://crbug.com/455098
1704 if (!scheduler_) 1704 if (!scheduler_)
1705 return; 1705 return;
1706 scheduler_->OnAudibilityChanged(child_id, route_id, is_playing); 1706 scheduler_->OnAudibilityChanged(child_id, route_id, is_playing);
1707 } 1707 }
1708 1708
1709 // This function is only used for saving feature. 1709 // This function is only used for saving feature.
1710 void ResourceDispatcherHostImpl::BeginSaveFile(const GURL& url, 1710 void ResourceDispatcherHostImpl::BeginSaveFile(const GURL& url,
1711 const Referrer& referrer, 1711 const Referrer& referrer,
1712 int save_item_id,
1712 int save_package_id, 1713 int save_package_id,
1713 int child_id, 1714 int child_id,
1714 int render_view_route_id, 1715 int render_view_route_id,
1715 int render_frame_route_id, 1716 int render_frame_route_id,
1716 ResourceContext* context) { 1717 ResourceContext* context) {
1717 if (is_shutdown_) 1718 if (is_shutdown_)
1718 return; 1719 return;
1719 1720
1720 // http://crbug.com/90971 1721 // http://crbug.com/90971
1721 char url_buf[128]; 1722 char url_buf[128];
(...skipping 23 matching lines...) Expand all
1745 // future, maybe we can use a configuration to configure this behavior. 1746 // future, maybe we can use a configuration to configure this behavior.
1746 request->SetLoadFlags(net::LOAD_PREFERRING_CACHE); 1747 request->SetLoadFlags(net::LOAD_PREFERRING_CACHE);
1747 1748
1748 // Since we're just saving some resources we need, disallow downloading. 1749 // Since we're just saving some resources we need, disallow downloading.
1749 ResourceRequestInfoImpl* extra_info = 1750 ResourceRequestInfoImpl* extra_info =
1750 CreateRequestInfo(child_id, render_view_route_id, 1751 CreateRequestInfo(child_id, render_view_route_id,
1751 render_frame_route_id, false, context); 1752 render_frame_route_id, false, context);
1752 extra_info->AssociateWithRequest(request.get()); // Request takes ownership. 1753 extra_info->AssociateWithRequest(request.get()); // Request takes ownership.
1753 1754
1754 scoped_ptr<ResourceHandler> handler(new SaveFileResourceHandler( 1755 scoped_ptr<ResourceHandler> handler(new SaveFileResourceHandler(
1755 request.get(), save_package_id, child_id, render_frame_route_id, url, 1756 request.get(), save_item_id, save_package_id, child_id,
1756 save_file_manager_.get())); 1757 render_frame_route_id, url, save_file_manager_.get()));
1757 1758
1758 BeginRequestInternal(request.Pass(), handler.Pass()); 1759 BeginRequestInternal(request.Pass(), handler.Pass());
1759 } 1760 }
1760 1761
1761 void ResourceDispatcherHostImpl::MarkAsTransferredNavigation( 1762 void ResourceDispatcherHostImpl::MarkAsTransferredNavigation(
1762 const GlobalRequestID& id) { 1763 const GlobalRequestID& id) {
1763 GetLoader(id)->MarkAsTransferring(); 1764 GetLoader(id)->MarkAsTransferring();
1764 } 1765 }
1765 1766
1766 void ResourceDispatcherHostImpl::CancelTransferringNavigation( 1767 void ResourceDispatcherHostImpl::CancelTransferringNavigation(
(...skipping 688 matching lines...) Expand 10 before | Expand all | Expand 10 after
2455 load_flags |= net::LOAD_PREFETCH; 2456 load_flags |= net::LOAD_PREFETCH;
2456 } 2457 }
2457 2458
2458 if (is_sync_load) 2459 if (is_sync_load)
2459 load_flags |= net::LOAD_IGNORE_LIMITS; 2460 load_flags |= net::LOAD_IGNORE_LIMITS;
2460 2461
2461 return load_flags; 2462 return load_flags;
2462 } 2463 }
2463 2464
2464 } // namespace content 2465 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/loader/resource_dispatcher_host_impl.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698